Skip to content

Commit 5fb6b6c

Browse files
committed
ci: update actions, upload to codecov for coverage report
1 parent e622eb1 commit 5fb6b6c

2 files changed

Lines changed: 39 additions & 34 deletions

File tree

.github/workflows/node.js.yml

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,40 +5,42 @@ name: Build
55

66
on:
77
push:
8-
branches: [ '*' ]
8+
branches: ["*"]
99
pull_request:
10-
branches: [ '*' ]
10+
branches: ["*"]
1111

1212
jobs:
1313
build:
14-
1514
runs-on: ubuntu-latest
1615

1716
strategy:
1817
matrix:
19-
node-version: [20.x]
18+
node-version: [22.x]
2019
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
2120

2221
steps:
23-
- uses: actions/checkout@v4
24-
- name: Use Node.js ${{ matrix.node-version }}
25-
uses: actions/setup-node@v4
26-
with:
27-
node-version: ${{ matrix.node-version }}
28-
- name: Cache .pnpm-store
29-
uses: actions/cache@v4
30-
with:
31-
path: ~/.pnpm-store
32-
key: ${{ runner.os }}-node${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }}
33-
- name: Install latest corepack
34-
run: npm install -g corepack@latest
35-
- name: Enable corepack
36-
run: corepack enable
37-
- run: pnpm install
38-
- run: pnpm eslint
39-
- run: pnpm test
40-
- run: pnpm build
41-
- name: Publish code coverage
42-
uses: paambaati/codeclimate-action@v3.2.0
43-
env:
44-
CC_TEST_REPORTER_ID: 7faf3080bb50c92d2efae792088aca807b6a54bafa2482384b30d163a7a28838
22+
- uses: actions/checkout@v4
23+
- name: Use Node.js ${{ matrix.node-version }}
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: ${{ matrix.node-version }}
27+
28+
- name: Cache .pnpm-store
29+
uses: actions/cache@v4
30+
with:
31+
path: ~/.pnpm-store
32+
key: ${{ runner.os }}-node${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }}
33+
34+
- name: Install latest corepack
35+
run: npm install -g corepack@latest
36+
37+
- run: corepack enable
38+
- run: pnpm install
39+
- run: pnpm lint
40+
- run: pnpm test
41+
- run: pnpm build
42+
43+
- name: Upload coverage reports to Codecov
44+
uses: codecov/codecov-action@v5
45+
with:
46+
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/npm-publish.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,16 @@ jobs:
1414
- uses: actions/checkout@v4
1515
- uses: actions/setup-node@v4
1616
with:
17-
node-version: 16
18-
- name: Install pnpm
19-
run: corepack enable
17+
node-version: 22
18+
- name: Install latest corepack
19+
run: npm install -g corepack@latest
20+
21+
- run: corepack enable
2022
- run: pnpm install
23+
- run: pnpm lint
2124
- run: pnpm test
2225
- run: pnpm build
23-
- uses: actions/upload-artifact@v3
26+
- uses: actions/upload-artifact@v4
2427
with:
2528
name: dist
2629
path: ./dist
@@ -32,9 +35,9 @@ jobs:
3235
- uses: actions/checkout@v4
3336
- uses: actions/setup-node@v4
3437
with:
35-
node-version: 16
38+
node-version: 22
3639
registry-url: https://registry.npmjs.org/
37-
- uses: actions/download-artifact@v3
40+
- uses: actions/download-artifact@v5
3841
with:
3942
name: dist
4043
path: dist/
@@ -52,10 +55,10 @@ jobs:
5255
- uses: actions/checkout@v4
5356
- uses: actions/setup-node@v4
5457
with:
55-
node-version: 16
58+
node-version: 22
5659
registry-url: https://npm.pkg.github.com/
5760
scope: "@anantoghosh"
58-
- uses: actions/download-artifact@v3
61+
- uses: actions/download-artifact@v5
5962
with:
6063
name: dist
6164
path: dist/

0 commit comments

Comments
 (0)