File tree Expand file tree Collapse file tree 1 file changed +24
-9
lines changed
Expand file tree Collapse file tree 1 file changed +24
-9
lines changed Original file line number Diff line number Diff line change 11name : CI
2+
23on :
34 pull_request :
45 push :
78 - ' v*'
89env :
910 node_version : " 20.x"
11+ FORCE_COLOR : 3
1012
1113jobs :
1214 build : # make sure build/ci work properly
@@ -19,12 +21,17 @@ jobs:
1921 with :
2022 node-version : ${{ env.node_version }}
2123
22- - name : npm install
23- run : npm install
24+ - name : npm ci
25+ run : npm ci --prefer-offline
2426
25- - name : npm run pack
27+ - name : npm run package
2628 run : npm run package
2729
30+ - name : Check for any changed files
31+ run : |
32+ [[ -z $(git status --untracked-files=no --porcelain) ]] || \
33+ (echo "::error title=npm run package::Files in the /dist directory shouldn't have changed. You forgot to run 'npm run package'." && exit 1)
34+
2835 audit :
2936 name : Audit
3037 runs-on : ubuntu-latest
3643 with :
3744 node-version : ${{ env.node_version }}
3845
46+ # We don't need to install deps to audit them
47+
3948 - name : npm audit
4049 run : npm audit --audit-level=critical
4150
@@ -49,15 +58,16 @@ jobs:
4958 uses : actions/setup-node@v4
5059 with :
5160 node-version : ${{ env.node_version }}
61+ cache : npm
62+ cache-dependency-path : ' **/package-lock.json'
5263
53- - name : npm install
54- run : npm install
64+ - name : npm ci
65+ run : npm ci --prefer-offline
5566
5667 - name : npm lint
5768 run : npm run lint
5869
59- # When tests are added to the code uncomment
60- # test-code:
70+ # test:
6171# name: Test
6272# runs-on: ubuntu-latest
6373# steps:
6777# uses: actions/setup-node@v4
6878# with:
6979# node-version: ${{ env.node_version }}
80+ # cache: npm
81+ # cache-dependency-path: '**/package-lock.json'
7082#
71- # - name: npm install
72- # run: npm install
83+ # - name: npm ci
84+ # run: npm ci --prefer-offline
7385#
7486# - name: npm test
7587# run: npm test
88+ #
89+ # - name: Report test coverage to Codecov
90+ # uses: codecov/codecov-action@v3
You can’t perform that action at this time.
0 commit comments