File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ version : 2
2+ updates :
3+ - package-ecosystem : npm
4+ directory : " /"
5+ schedule :
6+ interval : daily
7+ open-pull-requests-limit : 10
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2+ # For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
3+
4+ name : Publish packages
5+
6+ on :
7+ release :
8+ types : [created]
9+ workflow_dispatch :
10+
11+ jobs :
12+ build :
13+ name : Build bundle and publish to npmjs.com
14+ runs-on : ubuntu-latest
15+ steps :
16+ - name : Checkout ${{ matrix.node }}
17+ uses : actions/checkout@v3
18+
19+ - name : Setup Node.js ${{ matrix.node }}
20+ uses : actions/setup-node@v3
21+ with :
22+ node-version : 18
23+
24+ - name : Cache dependencies ${{ matrix.node }}
25+ uses : action/cache@v3
26+ with :
27+ path : ~/.npm
28+ key : ${{ runner.os }}-node-${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }}
29+ restore-keys : |
30+ ${{ runner.os }}-node-$ {{ matrix.node }}
31+ run : |
32+ npm ci
33+ npm run build
34+ npm publish --access public
35+ env :
36+ NODE_AUTH_TOKEN : ${{secrets.npm_token}}
Original file line number Diff line number Diff line change 1+ name : Test suite
2+
3+ on :
4+ push :
5+ branches : [main]
6+ pull_request :
7+ branches : [main]
8+
9+ jobs :
10+ lintjs :
11+ name : Javascript standard lint
12+ runs-on : ubuntu-latest
13+ steps :
14+ - name : checkout
15+ uses : actions/checkout@v3
16+
17+ - name : setup node
18+ uses : actions/setup-node@v3
19+ with :
20+ node-version : 18
21+
22+ - name : cache dependencies
23+ uses : actions/cache@v3
24+ with :
25+ path : ~/.npm
26+ key : ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
27+ restore-keys : |
28+ ${{ runner.os }}-node-
29+ - run : npm ci
30+ - run : npm run lint
31+
32+ unittest :
33+ name : unit tests
34+ runs-on : ubuntu-latest
35+ needs : [lintjs]
36+ strategy :
37+ matrix :
38+ node : [16, 18, 20]
39+ steps :
40+ - name : Checkout ${{ matrix.node }}
41+ uses : actions/checkout@v3
42+
43+ - name : Setup node ${{ matrix.node }}
44+ uses : actions/setup-node@v3
45+ with :
46+ node-version : ${{ matrix.node }}
47+
48+ - name : Cache dependencies ${{ matrix.node }}
49+ uses : actions/cache@v3
50+ with :
51+ path : ~/.npm
52+ key : ${{ runner.os }}-node-${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }}
53+ restore-keys : |
54+ ${{ runner.os }}-node-${{ matrix.node }}
55+ - run : npm ci
56+ - run : npm run test
You can’t perform that action at this time.
0 commit comments