Skip to content

Commit c9122a6

Browse files
committed
feat: introduced GitHub Workflow Actions for url automated testing
added url.yml added necessary elements to package.json, including script shortcut "test-url" that is used by url.yml
1 parent 43780c3 commit c9122a6

File tree

3 files changed

+34
-20
lines changed

3 files changed

+34
-20
lines changed

.github/workflows/github-actions-demo.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

.github/workflows/url.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: URL Navigation and Parameter Input CI
2+
3+
on:
4+
push:
5+
branches:
6+
- 2024_sem2
7+
pull_request:
8+
branches:
9+
- 2024_sem2
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
15+
- name: Checkout 🛎️
16+
uses: actions/[email protected]
17+
with:
18+
persist-credentials: false
19+
20+
- name: Install dependencies
21+
run:
22+
npm install
23+
npm install jest supertest --save-dev
24+
25+
- name: Run tests 🔧
26+
run:
27+
npm start
28+
npm test-url

package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"start:win32": "SET NODE_OPTIONS=--openssl-legacy-provider && react-scripts start",
1616
"test": "react-scripts test",
1717
"test-uf": "npm test -- ./src/algorithms/controllers/unionFind.test.js",
18-
"test-234t": "npm test -- ./src/algorithms/controllers/TTFTree.test.js"
18+
"test-234t": "npm test -- ./src/algorithms/controllers/TTFTree.test.js",
19+
"test-url": "npm test -- ./src/algorithms/parameters/helpers/urlHelpers.test.js"
1920
},
2021
"husky": {
2122
"hooks": {
@@ -62,6 +63,7 @@
6263
"@mui/styles": "^5.14.4",
6364
"@testing-library/jest-dom": "^4.2.4",
6465
"@testing-library/react": "^12.1.2",
66+
"@testing-library/react-hooks": "^8.0.1",
6567
"@testing-library/user-event": "^14.4.3",
6668
"denque": "^2.0.1",
6769
"framer-motion": "^4.0.0",
@@ -90,9 +92,11 @@
9092
"eslint-plugin-jsx-a11y": "^6.7.1",
9193
"eslint-plugin-react": "^7.33.2",
9294
"husky": "^4.2.5",
95+
"jest": "^27.5.1",
9396
"lint-staged": "^10.1.3",
9497
"react": "^17.0.2",
9598
"react-test-renderer": "^17.0.2",
96-
"run-script-os": "^1.1.6"
99+
"run-script-os": "^1.1.6",
100+
"supertest": "^7.0.0"
97101
}
98102
}

0 commit comments

Comments
 (0)