Skip to content

Commit 7537689

Browse files
committed
Update GitHub Actions workflows for CI and publishing
- Simplify CI workflow by removing matrix strategy for Node.js versions, now fixed to 20.x - Change npm install to npm ci for consistency in both CI and publish workflows - Update test command in CI workflow to run 'npm run test' instead of 'npm run test:run' Signed-off-by: w01fgang <sumin@unix-center.ru>
1 parent 5d0d326 commit 7537689

2 files changed

Lines changed: 15 additions & 23 deletions

File tree

.github/workflows/ci.yml

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,27 @@ name: CI
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [main]
66
pull_request:
7-
branches: [ main ]
7+
branches: [main]
88

99
jobs:
1010
test:
1111
runs-on: ubuntu-latest
12-
13-
strategy:
14-
matrix:
15-
node-version: [18.x, 20.x, 22.x]
1612

1713
steps:
1814
- uses: actions/checkout@v3
19-
20-
- name: Use Node.js ${{ matrix.node-version }}
21-
uses: actions/setup-node@v3
15+
- uses: actions/setup-node@v3
2216
with:
23-
node-version: ${{ matrix.node-version }}
24-
cache: 'npm'
25-
17+
node-version: "20.x"
18+
registry-url: "https://registry.npmjs.org"
19+
cache: "npm"
20+
2621
- name: Install dependencies
2722
run: npm ci
28-
23+
2924
- name: Type check
3025
run: npx tsc --noEmit
31-
26+
3227
- name: Run tests
33-
run: npm run test:run
34-
35-
- name: Build
36-
run: npm run build
28+
run: npm run test

.github/workflows/publish.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ jobs:
99
- uses: actions/checkout@v3
1010
- uses: actions/setup-node@v3
1111
with:
12-
node-version: '20.x'
13-
registry-url: 'https://registry.npmjs.org'
14-
- run: npm install
12+
node-version: "20.x"
13+
registry-url: "https://registry.npmjs.org"
14+
- run: npm ci
15+
- run: npm run test
1516
- run: npm run build
16-
- run: npm run test:run
1717
- run: npm publish
1818
env:
19-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
19+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)