-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: unittests on PR and Release workflows (#85)
- Loading branch information
1 parent
157bdaf
commit bc6e82b
Showing
6 changed files
with
113 additions
and
10 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
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,49 @@ | ||
name: (sub) Unit Tests | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
python_version: | ||
description: A version of Python to install | ||
type: string | ||
required: true | ||
|
||
jobs: | ||
|
||
unittests: | ||
name: Verify unit tests are successful | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ inputs.python_version }} | ||
|
||
- name: Install Poetry | ||
uses: Gr1N/setup-poetry@v8 | ||
|
||
- name: Create Poetry venv | ||
run: | | ||
poetry env use ${{ inputs.python_version }} | ||
poetry install | ||
- name: Run unit tests and coverage | ||
run: poetry run make test_coverage | ||
|
||
# requires pull-requests: write permissions when triggered from PRs | ||
- name: Get coverage | ||
uses: orgoro/coverage@v3.1 | ||
with: | ||
coverageFile: coverage.xml | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
thresholdAll: 0.95 | ||
thresholdNew: 0.90 | ||
thresholdModified: 0.95 | ||
if: ${{ github.event_name == 'pull_request' }} |
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