@@ -3,40 +3,54 @@ name: Test
33on :
44 push :
55 branches :
6- - main
6+ - main
77 pull_request :
88
9+ permissions :
10+ content : read
11+
912jobs :
1013 setup :
1114 name : Setup
1215 runs-on : ubuntu-latest
1316 outputs :
1417 nodes : ${{ steps.nodes.outputs.nodes }}
1518 steps :
16- - uses : actions/checkout@v4
17- - uses : actions/setup-node@v3
19+ - uses : actions/checkout@v6
20+ - uses : actions/setup-node@v6
1821 - name : Setup Node Version Matrix
1922 id : nodes
2023 run : |
2124 NODES=$(npx -y @pkgjs/nv ls supported | jq '. | .version' | paste -sd "," -)
2225 echo "nodes=[${NODES}]" >> $GITHUB_OUTPUT
2326
27+ lint :
28+ runs-on : ubuntu-latest
29+ needs : setup
30+ steps :
31+ - uses : actions/checkout@v6
32+ - name : Use Node.js 24.x
33+ uses : actions/setup-node@v6
34+ with :
35+ node-version : 24.x
36+ - run : npm i
37+ - run : npm run lint
38+
2439 test :
25- # uses: pkgjs/action/.github/workflows/node-test.yaml@v0
2640 runs-on : ubuntu-latest
2741 needs : setup
2842 strategy :
2943 matrix :
3044 node-version : ${{ fromJson(needs.setup.outputs.nodes) }}
3145 steps :
32- - uses : actions/checkout@v4
33- - name : Setup git user
34- run : |
35- git config --global user.name "$(git --no-pager log --format=format:'%an' -n 1)"
36- git config --global user.email "$(git --no-pager log --format=format:'%ae' -n 1)"
37- - name : Use Node.js ${{ matrix.node-version }}
38- uses : actions/setup-node@v3
39- with :
40- node-version : ${{ matrix.node-version }}
41- - name : npm install and test
42- run : npm it
46+ - uses : actions/checkout@v6
47+ - name : Setup git user
48+ run : |
49+ git config --global user.name "$(git --no-pager log --format=format:'%an' -n 1)"
50+ git config --global user.email "$(git --no-pager log --format=format:'%ae' -n 1)"
51+ - name : Use Node.js ${{ matrix.node-version }}
52+ uses : actions/setup-node@v6
53+ with :
54+ node-version : ${{ matrix.node-version }}
55+ - name : npm install and test
56+ run : npm it
0 commit comments