Skip to content

Commit

Permalink
ci: add code coverage benchmark (#2683)
Browse files Browse the repository at this point in the history
* ci: add code coverage benchmark

* fix: fix yaml grammer error

* fix: change nyc install strategy
  • Loading branch information
iChenLei committed May 26, 2022
1 parent 33e583b commit 2bf86ff
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
19 changes: 17 additions & 2 deletions .github/workflows/ci.yml
Expand Up @@ -66,16 +66,31 @@ jobs:
run: npm run test

benchmark:
name: 'Run stylus benchmark with node16'
name: 'Run stylus benchmark with node18'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
node-version: '18'
- name: Install npm dependencies
run: npm install
- name: Print put node & npm version
run: node --version && npm --version
- name: Run Benchmark
run: node ./bm.js

coverage:
name: 'Run nyc for code coverage'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'
- name: Print put node & npm version
run: node --version && npm --version
- name: Install npm dependencies
run: npm install
- name: Run nyc
run: npx nyc@latest npm run test
3 changes: 1 addition & 2 deletions package.json
Expand Up @@ -25,8 +25,7 @@
},
"scripts": {
"prepublish": "npm prune",
"test": "mocha test/ test/middleware/ --require chai --bail --check-leaks --reporter dot",
"test-cov": "mocha test/ test/middleware/ --require chai --bail --reporter html-cov > coverage.html"
"test": "mocha test/ test/middleware/ --require chai --bail --check-leaks --reporter dot"
},
"dependencies": {
"css": "^3.0.0",
Expand Down

0 comments on commit 2bf86ff

Please sign in to comment.