Skip to content

Commit b7fbb32

Browse files
committed
fix tests seperate to publish
1 parent df122df commit b7fbb32

3 files changed

Lines changed: 57 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- develop
8+
pull_request:
9+
branches:
10+
- main
11+
- develop
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
test:
18+
runs-on: ubuntu-latest
19+
strategy:
20+
matrix:
21+
node-version: [18, 20]
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@v4
25+
with:
26+
fetch-depth: 0
27+
28+
- name: Set up Node.js ${{ matrix.node-version }}
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: ${{ matrix.node-version }}
32+
cache: 'npm'
33+
34+
- name: Install dependencies
35+
run: npm ci
36+
37+
- name: Lint
38+
run: npm run lint
39+
40+
- name: Type check
41+
run: npm run type-check
42+
43+
- name: Run tests with coverage
44+
run: npm run test:ci
45+
46+
- name: Upload coverage reports
47+
uses: codecov/codecov-action@v3
48+
with:
49+
files: ./coverage/coverage-final.json
50+
flags: unittests
51+
name: codecov-umbrella
52+
fail_ci_if_error: false
53+

.github/workflows/publish.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ jobs:
3636
- name: Install dependencies
3737
run: npm ci
3838

39+
- name: Build
40+
run: npm run build
41+
3942
- name: Derive release version
4043
id: release_version
4144
env:

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"test:ci": "npm run build && jest --coverage --ci --watchAll=false --testTimeout=30000",
3131
"coverage:report": "node scripts/coverage-analysis.js",
3232
"type-check": "tsc --noEmit",
33-
"prepublishOnly": "npm run build && npm run test:ci",
33+
"prepublishOnly": "npm run build",
3434
"prepack": "npm run build"
3535
},
3636
"keywords": [

0 commit comments

Comments
 (0)