Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add code coverage benchmark #2683

Merged
merged 3 commits into from May 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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