Skip to content

Commit 1130d2c

Browse files
committed
ci: update test workflows
1 parent 2adc7a2 commit 1130d2c

File tree

3 files changed

+32
-12
lines changed

3 files changed

+32
-12
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,27 @@
11
name: CI
22
on:
3-
workflow_call:
43
push:
54
branches:
65
- main
7-
pull_request:
8-
branches:
9-
- main
106
jobs:
117
test:
128
permissions:
139
contents: read
1410
runs-on: ubuntu-latest
1511
steps:
16-
- uses: actions/checkout@v2
17-
- uses: actions/setup-node@v3
12+
- uses: actions/checkout@v5.0.0
13+
with:
14+
persist-credentials: false
15+
- uses: actions/setup-node@v5.0.0
1816
with:
19-
node-version: "14.18"
20-
cache: npm
21-
- name: Build and test coverage
17+
node-version-file: ".node-version"
18+
- name: Install dependencies, run test coverage
2219
run: |
2320
npm ci
24-
npm install c8
21+
npm install c8@10.1.3
2522
npm run coverage
2623
- name: Coveralls
27-
uses: coverallsapp/github-action@master
24+
if: github.ref == 'refs/heads/main'
25+
uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b #v2.3.6
2826
with:
29-
github-token: ${{ secrets.GITHUB_TOKEN }}
27+
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)