File tree Expand file tree Collapse file tree 1 file changed +41
-9
lines changed Expand file tree Collapse file tree 1 file changed +41
-9
lines changed Original file line number Diff line number Diff line change 1919 BRANCH : ${{ github.base_ref }}
2020
2121jobs :
22- build :
23- name : koku-ui build
22+ lint :
23+ name : Lint
24+ runs-on : ubuntu-latest
25+
26+ steps :
27+ - name : Checkout code
28+ uses : actions/checkout@v4
29+
30+ - name : Setup Node.js
31+ uses : actions/setup-node@v4
32+ with :
33+ node-version : 18
34+
35+ - name : Cache node modules
36+ id : cache-npm
37+ uses : actions/cache@v4
38+ env :
39+ cache-name : cache-node-modules
40+ with :
41+ # npm cache files are stored in `~/.npm` on Linux/macOS
42+ path : ~/.npm
43+ key : ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
44+ restore-keys : |
45+ ${{ runner.os }}-build-${{ env.cache-name }}-
46+ ${{ runner.os }}-build-
47+ ${{ runner.os }}-
48+
49+ - name : Install dependencies
50+ run : npm install
51+
52+ - name : Lint
53+ run : npm run lint
54+
55+ units :
56+ name : Units - ${{ matrix.node-version }}
2457 runs-on : ubuntu-latest
2558 strategy :
2659 matrix :
27- node-version : [18]
60+ fail-fast : false
61+ node-version :
62+ - ' 18'
63+
2864 steps :
2965 - name : Checkout code
3066 uses : actions/checkout@v4
@@ -54,16 +90,12 @@ jobs:
5490 - name : Build
5591 run : npm run build
5692
57- - name : Lint
58- if : ${{ success() }}
59- run : npm run lint
60-
6193 - name : Test
62- if : ${{ success() }}
94+ id : test
6395 run : npm test -- --collect-coverage --max-workers=4
6496
6597 - name : Upload coverage report
66- if : ${{ success() }}
98+ if : steps.test.outcome == 'success'
679968100 env :
69101 CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
You can’t perform that action at this time.
0 commit comments