Skip to content

Commit

Permalink
fix coverage (#558)
Browse files Browse the repository at this point in the history
  • Loading branch information
gossi authored May 13, 2022
1 parent 3c5ec9d commit bb12d96
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 5 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,21 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Setup node
uses: volta-cli/action@v1
- uses: actions/checkout@v3
- run: yarn install
- name: Setup Tools
uses: volta-cli/action@v1
- name: Cache pnpm modules
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
- uses: pnpm/action-setup@v2.2.1
with:
version: latest

- run: pnpm install
- run: yarn test
- name: Collect Coverage and Submit to CodeClimate
uses: paambaati/codeclimate-action@v3.0.0
Expand Down
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,9 @@
"private": true,
"volta": {
"node": "16.15.0"
},
"scripts": {
"test": "pnpm run --filter theemo test",
"coverage": "pnpm run --filter theemo coverage"
}
}
1 change: 1 addition & 0 deletions packages/theemo/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export default {
coveragePathIgnorePatterns: ['/node_modules/', '/test/'],
extensionsToTreatAsEsm: ['.ts'],
transform: {
'^.+\\.ts$': [
Expand Down
4 changes: 2 additions & 2 deletions packages/theemo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
"dts": "tsc --emitDeclarationOnly",
"build": "pnpm swc src/ --out-dir dist/",
"start": "pnpm swc src/ --out-dir dist/ -w",
"test": "jest --clearCache && NODE_OPTIONS='--experimental-vm-modules --experimental-specifier-resolution=node' jest",
"coverage": "pnpm test --coverage=true",
"test": "jest --clearCache && NODE_OPTIONS='--experimental-vm-modules' jest",
"coverage": "pnpm test -- --coverage=true",
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel 'lint:!(fix)'",
"lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*:fix",
"lint:js": "eslint --ext ts,js src/ test/ --cache",
Expand Down

0 comments on commit bb12d96

Please sign in to comment.