Skip to content

Commit 955a7d5

Browse files
committed
ci: update test workflows
1 parent 2adc7a2 commit 955a7d5

File tree

3 files changed

+32
-11
lines changed

3 files changed

+32
-11
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,25 @@ on:
44
push:
55
branches:
66
- main
7-
pull_request:
8-
branches:
9-
- main
107
jobs:
118
test:
129
permissions:
1310
contents: read
1411
runs-on: ubuntu-latest
1512
steps:
16-
- uses: actions/checkout@v2
17-
- uses: actions/setup-node@v3
13+
- uses: actions/checkout@v5.0.0
14+
with:
15+
persist-credentials: false
16+
- uses: actions/setup-node@v5.0.0
1817
with:
19-
node-version: "14.18"
20-
cache: npm
21-
- name: Build and test coverage
18+
node-version-file: ".node-version"
19+
- name: Install dependencies, run test coverage
2220
run: |
2321
npm ci
24-
npm install c8
22+
npm install c8@10.1.3
2523
npm run coverage
2624
- name: Coveralls
27-
uses: coverallsapp/github-action@master
25+
if: github.ref == 'refs/heads/main'
26+
uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b #v2.3.6
2827
with:
29-
github-token: ${{ secrets.GITHUB_TOKEN }}
28+
github-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/pull-request.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Pull Request test
2+
on:
3+
pull_request:
4+
branches:
5+
- main
6+
jobs:
7+
test:
8+
permissions:
9+
contents: read
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v5.0.0
13+
with:
14+
persist-credentials: false
15+
- uses: actions/setup-node@v5.0.0
16+
with:
17+
node-version-file: ".node-version"
18+
- name: Install dependencies and test
19+
run: |
20+
npm ci
21+
npm run test

.node-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v14.18.0

0 commit comments

Comments
 (0)