File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,11 +34,44 @@ jobs:
3434 with :
3535 skipOnCommitMsg : " [skip_build]"
3636 githubToken : ${{ secrets.GITHUB_TOKEN }}
37- build :
37+ test :
3838 runs-on : ubuntu-latest
3939 needs : checkExecution
4040 # only execute if not skipped by commit message
4141 if : needs.checkExecution.outputs.shouldExecute == 'true'
42+ strategy :
43+ matrix :
44+ # Test with Node.js v20 and v22
45+ node :
46+ - 20
47+ - 22
48+ name : Node.js v${{ matrix.node }}
49+ steps :
50+ # checkout branch
51+ - name : Checkout
52+ uses : actions/checkout@v4
53+ with :
54+ # 0 indicates all history, because publish requires tag information
55+ fetch-depth : 0
56+ # we need privileged access to publish to protected branch
57+ token : ${{ secrets.GH_TOKEN_PUBLIC_REPO }}
58+ # setup node and dependency cache
59+ - name : Setup Node and NPM Cache
60+ uses : actions/setup-node@v4
61+ with :
62+ node-version : ${{ matrix.node }}
63+ cache : ' npm'
64+ # install dependencies
65+ - name : Install
66+ run : HUSKY=0 npm ci
67+ # test
68+ - name : Test
69+ run : npm run test:ci
70+ build :
71+ runs-on : ubuntu-latest
72+ needs : [checkExecution, test]
73+ # only execute if not skipped by commit message
74+ if : needs.checkExecution.outputs.shouldExecute == 'true'
4275 steps :
4376 # checkout branch
4477 - name : Checkout
6396 # lint
6497 - name : Lint
6598 run : npm run lint:ci
66- # test
67- - name : Test
68- run : npm run test:ci
6999 # build
70100 - name : Build
71101 run : npm run build:ci
You can’t perform that action at this time.
0 commit comments