Skip to content

Commit

Permalink
chore: add code coverage for core
Browse files Browse the repository at this point in the history
  • Loading branch information
Walther committed Jul 27, 2023
1 parent 86bb66f commit bcdfd22
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 3 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: core test coverage

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
name: core test coverage
steps:
- uses: actions/checkout@v3
- name: Use Node.js 18.15
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8
with:
node-version: 18.15
- name: Build package
run: |
yarn
yarn build
- name: Run tests and collect coverage
working-directory: ./core
run: yarn coverage
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v3
5 changes: 3 additions & 2 deletions core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,8 @@
"integ-minikube": "GARDEN_INTEG_TEST_MODE=local GARDEN_SKIP_TESTS=\"remote-only\" yarn _integ",
"integ-remote": "GARDEN_INTEG_TEST_MODE=remote GARDEN_SKIP_TESTS=local-only yarn _integ",
"test": "mocha",
"test:silly": "GARDEN_LOGGER_TYPE=basic GARDEN_LOG_LEVEL=silly mocha"
"test:silly": "GARDEN_LOGGER_TYPE=basic GARDEN_LOG_LEVEL=silly mocha",
"coverage": "nyc --reporter lcov mocha"
},
"pkg": {
"scripts": [
Expand All @@ -276,4 +277,4 @@
]
},
"gitHead": "b0647221a4d2ff06952bae58000b104215aed922"
}
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"minimist": "^1.2.6",
"node-jsonl": "^0.1.0",
"npm-license-crawler": "^0.2.1",
"nyc": "^15.1.0",
"prettier": "3.0.0",
"replace-in-file": "^6.0.0",
"semver": "^7.5.4",
Expand Down Expand Up @@ -100,4 +101,4 @@
"plugins/*",
"sdk"
]
}
}

0 comments on commit bcdfd22

Please sign in to comment.