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
1 parent
b35e8d6
commit 73721ea
Showing
4 changed files
with
87 additions
and
18 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,67 @@ | ||
name: Run PyTest | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- 'feature/**' | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
test: | ||
name: Test on ubuntu Python ${{ matrix.python-version }} | ||
runs-on: ubuntu-latest #${{ matrix.os }} | ||
strategy: | ||
max-parallel: 1 | ||
matrix: | ||
#os: [ubuntu-latest, windows-latest] # macOS-latest wouldn't run, so skipping. windows takes 50% longer than ubuntu | ||
python-version: [3.8] # [3.6, 3.7, 3.8] | ||
steps: | ||
- name: Dump GitHub context | ||
id: github_context_step | ||
run: echo '${{ toJSON(github) }}' | ||
#- name: Dump runner context | ||
# run: echo '${{ toJSON(runner) }}' | ||
#- name: Dump strategy context | ||
# run: echo '${{ toJSON(strategy) }}' | ||
- name: Checkout repo | ||
uses: actions/checkout@v2 | ||
- name: Install Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
pip install pipenv pytest_cov | ||
# pipenv install pytest_cov | ||
pipenv install --dev --skip-lock | ||
pipenv install -e . --skip-lock | ||
# pipenv uses requirements.txt | ||
- name: Testing and coverage report | ||
run: | | ||
pipenv run coverage run setup.py test | ||
pipenv run coverage xml | ||
- name: Publish to codecov | ||
uses: codecov/codecov-action@v2 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos | ||
#files: ./coverage.xml #./coverage1.xml,./coverage2.xml # optional | ||
directory: ./ | ||
flags: unittests # optional | ||
name: codecov-umbrella # optional | ||
fail_ci_if_error: true # optional (default = false) | ||
verbose: false # optional (default = false) | ||
|
||
- name: Publish to GitHub # cobertura-report format publishes coverage.xml | ||
uses: 5monkeys/cobertura-action@v12 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
minimum_coverage: 40 | ||
fail_below_threshold: 40 | ||
|
||
# GHA workflow: diffs are limited to 300 files. If there are files changed that aren't matched in the first 300 files returned by the | ||
# filter, the workflow will not run. You may need to create more specific filters so that the workflow will run automatically. | ||
# SETUP: use https://github.com/FoxoTech/methylcheck/settings/secrets/actions to setup the 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