File tree Expand file tree Collapse file tree 1 file changed +14
-26
lines changed Expand file tree Collapse file tree 1 file changed +14
-26
lines changed Original file line number Diff line number Diff line change 1- name : CI - Unit Tests
1+ name : Run Unit Tests
22
33on :
44 push :
5- branches : ['master'] # or your master branch
5+ branches :
6+ - master
7+ - develop
68 pull_request :
7- branches : ['master'] # or whichever branches you want to test on PR
9+ branches :
10+ - master
11+ - develop
812
913jobs :
10- build-and- test :
14+ test :
1115 runs-on : ubuntu-latest
12-
1316 steps :
14- # 1) Check out your repository code
15- - name : Checkout
17+ - name : Checkout Repository
1618 uses : actions/checkout@v3
1719
18- # 2) Use a Node version (e.g., 16, 18, or LTS)
19- - name : Use Node.js
20+ - name : Setup Node.js
2021 uses : actions/setup-node@v3
2122 with :
22- node-version : 16
23+ node-version : 18
24+ cache : ' npm'
2325
24- # 3) Install dependencies
25- - name : Install dependencies
26+ - name : Install Dependencies
2627 run : npm install
2728
28- # 4) (Optional) Build step if your project requires a build
29- # - e.g. "npm run build"
30- # run: npm run build
31-
32- # 5) Run unit tests
33- - name : Run tests
29+ - name : Run Unit Tests
3430 run : npm test
35-
36- # 6) (Optional) Upload coverage folder as an artifact
37- - name : Upload coverage artifact
38- if : always()
39- uses : actions/upload-artifact@v3
40- with :
41- name : coverage
42- path : coverage
You can’t perform that action at this time.
0 commit comments