File tree Expand file tree Collapse file tree 3 files changed +79
-2
lines changed Expand file tree Collapse file tree 3 files changed +79
-2
lines changed Original file line number Diff line number Diff line change 1+ name : Test
2+
3+ on :
4+ push :
5+ branches :
6+ - master
7+ # renovate/** branches are generated by https://github.com/apps/renovate
8+ - renovate/**
9+
10+ pull_request :
11+ types :
12+ - opened
13+ - synchronize
14+ merge_group :
15+
16+ permissions :
17+ contents : read # to fetch code (actions/checkout)
18+
19+ jobs :
20+ test_matrix :
21+ strategy :
22+ matrix :
23+ node-version :
24+ - 18
25+ - 19
26+ - 20
27+ - 21
28+ runs-on : ubuntu-latest
29+ timeout-minutes : 10
30+
31+ steps :
32+ - uses : actions/checkout@v4
33+ - run : git config --global user.name github-actions
34+ - run : git config --global user.email github-actions@github.com
35+ - name : Use Node.js ${{ matrix.node-version }}
36+ uses : actions/setup-node@v4
37+ with :
38+ node-version : ${{ matrix.node-version }}
39+ cache : npm
40+ - run : npm clean-install
41+ - name : Ensure dependencies are compatible with the version of node
42+ run : npx ls-engines
43+ - run : npm run test:e2e
44+
45+ test :
46+ runs-on : ubuntu-latest
47+ needs : test_matrix
48+ steps :
49+ - uses : actions/checkout@v4
50+ - uses : actions/setup-node@v4
51+ with :
52+ node-version : lts/*
53+ cache : npm
54+ - run : npm clean-install
55+ - run : npm audit signatures
56+ - run : npm run lint
57+
58+ coverage :
59+ runs-on : ubuntu-latest
60+ needs :
61+ - test_matrix
62+ - test
63+ steps :
64+ - uses : actions/checkout@v4
65+ - uses : actions/setup-node@v4
66+ with :
67+ node-version : lts/*
68+ cache : npm
69+ - run : npm clean-install
70+ - run : npm run test:e2e:cov
71+ - name : Upload coverage reports to Codecov
72+ uses : codecov/codecov-action@v3
73+ env :
74+ CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
Original file line number Diff line number Diff line change @@ -11,8 +11,7 @@ npm-debug.log
1111.DS_Store
1212
1313# tests
14- /test
15- /coverage
14+ /tests /coverage
1615/.nyc_output
1716
1817# dist
Original file line number Diff line number Diff line change 1414 "format" : " prettier --write \" **/*.ts\" " ,
1515 "lint" : " eslint 'lib/**/*.ts' --fix" ,
1616 "test:e2e" : " jest --config ./tests/jest-e2e.json --runInBand" ,
17+ "test:e2e:cov" : " jest --config ./tests/jest-e2e.json --runInBand --coverage" ,
1718 "test:e2e:dev" : " jest --config ./tests/jest-e2e.json --runInBand --watch" ,
1819 "prepare" : " husky install" ,
1920 "semantic-release" : " semantic-release"
2021 },
22+ "engines" : {
23+ "node" : " >=18"
24+ },
2125 "main" : " dist/index.js" ,
2226 "types" : " dist/index.d.ts" ,
2327 "devDependencies" : {
You can’t perform that action at this time.
0 commit comments