-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
35 changed files
with
583 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
name: Run code coverage | ||
on: | ||
push: | ||
branches: | ||
- dev | ||
tags-ignore: # exclude tags created by "ci_addons publish_github_release" | ||
- 'latest' | ||
- 'latest-tmp' | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
run-coverage: | ||
name: ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
# TODO | ||
# run pipeline on either a push event or a PR event on a fork | ||
# if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name | ||
defaults: | ||
run: | ||
shell: bash | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
env: | ||
OS: ${{ matrix.os }} | ||
PYTHON: '3.10' | ||
steps: | ||
- name: Cancel any previous incomplete runs | ||
uses: styfle/[email protected] | ||
with: | ||
all_but_latest: true | ||
access_token: ${{ github.token }} | ||
|
||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: 'recursive' | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: '3.9' | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install -r requirements-dev.txt -r requirements.txt | ||
- name: Install optional dependencies | ||
if: ${{ matrix.opt_req }} | ||
run: python -m pip install -r requirements-opt.txt | ||
|
||
- name: Install package | ||
run: | | ||
python -m pip install -e . # must install in editable mode for coverage to find sources | ||
python -m pip list | ||
- name: Run unit tests and generate coverage report | ||
run: | | ||
python -m coverage run test.py --pynwb | ||
python -m coverage xml # codecov uploader requires xml format | ||
python -m coverage report -m | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
flags: unit | ||
fail_ci_if_error: true | ||
|
||
- name: Run integration tests and generate coverage report | ||
run: | | ||
python -m coverage run -p test.py --integration | ||
# validation CLI tests generate separate .coverage files that need to be merged | ||
python -m coverage combine | ||
python -m coverage xml # codecov uploader requires xml format | ||
python -m coverage report -m | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
flags: integration | ||
fail_ci_if_error: true |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.