-
Notifications
You must be signed in to change notification settings - Fork 6
40 lines (36 loc) · 921 Bytes
/
test.yml
File metadata and controls
40 lines (36 loc) · 921 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Test
on:
push:
pull_request:
permissions:
contents: read
jobs:
test:
name: 'Test Node.js (v${{ matrix.node-version }})'
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20, 22, 24]
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
node-version: ${{ matrix.node-version }}
cache: npm
- run: npm ci
- run: npm run lint
- run: npm run test
- run: npm publish --dry-run
# All "needs" jobs will need to succeed for a pull request to be merged.
results:
if: always()
runs-on: ubuntu-latest
needs: [test]
steps:
- name: Check Results
run: |
outcome='${{ toJSON(needs.*.result) }}'
if [[ $(echo $outcome | jq -e 'all(. == "success")') != "true" ]]; then
echo "Some required steps failed!";
exit 1;
fi