-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from justin13601/tests
Add comprehensive tests
- Loading branch information
Showing
10 changed files
with
114 additions
and
372 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Same as `code-quality-pr.yaml` but triggered on commit to main branch | ||
# and runs on all files (instead of only the changed ones) | ||
|
||
name: Code Quality Main | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
|
||
jobs: | ||
code-quality: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v3 | ||
|
||
- name: Run pre-commits | ||
uses: pre-commit/action@v3.0.0 |
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,36 @@ | ||
# This workflow finds which files were changed, prints them, | ||
# and runs `pre-commit` on those files. | ||
|
||
# Inspired by the sktime library: | ||
# https://github.com/alan-turing-institute/sktime/blob/main/.github/workflows/test.yml | ||
|
||
name: Code Quality PR | ||
|
||
on: | ||
pull_request: | ||
branches: [master, "release/*", "dev"] | ||
|
||
jobs: | ||
code-quality: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v3 | ||
|
||
- name: Find modified files | ||
id: file_changes | ||
uses: trilom/file-changes-action@v1.2.4 | ||
with: | ||
output: " " | ||
|
||
- name: List modified files | ||
run: echo '${{ steps.file_changes.outputs.files}}' | ||
|
||
- name: Run pre-commits | ||
uses: pre-commit/action@v3.0.0 | ||
with: | ||
extra_args: --files ${{ steps.file_changes.outputs.files}} |
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,41 @@ | ||
name: Tests | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
branches: [master, "release/*", "dev"] | ||
|
||
jobs: | ||
run_tests_ubuntu: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
|
||
timeout-minutes: 30 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Install packages | ||
run: | | ||
pip install -e .[dev] | ||
#---------------------------------------------- | ||
# run test suite | ||
#---------------------------------------------- | ||
- name: Run tests | ||
run: | | ||
pytest -v --doctest-modules --ignore=profiling/ --ignore=run.py --cov=src -s | ||
- name: Upload coverage reports to Codecov | ||
uses: codecov/codecov-action@v4.0.1 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} |
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
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.