Create pull_request_template #20
Workflow file for this run
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
name: Test | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python: [3.7, 3.8, 3.9] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install Tox and any other packages | |
run: pip install tox | |
- name: Run Tox | |
# Run tox using the version of Python in `PATH` | |
run: tox -e py | |
- uses: actions/cache@v3 | |
with: | |
path: ./coverage.xml # Note that this path is not influenced by working-directory set in defaults, for example | |
key: coverage | |
finish-codecov: | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/cache@v3 | |
with: | |
path: ./coverage.xml # See the note below | |
key: coverage # Must be the same key you specified in the first job | |
- uses: codecov/codecov-action@v3 | |
with: | |
files: ./coverage.xml | |
flags: unittests # optional | |
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos | |
fail_ci_if_error: true # optional (default = false) | |
verbose: true # optional (default = false) |