refactor #231
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: Tests | |
on: [push, pull_request] # skip workflow with [skip ci] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.8' | |
- name: Display Python version | |
run: python -c "import sys; print(sys.version)" | |
- name: Install requirements | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements_dev.txt | |
- name: Test with pytest | |
if: ${{ !contains(github.event.head_commit.message, '[skip tests]') }} | |
run: | | |
pytest --cov=./ --cov-report=xml | |
- name: Upload coverage report to codecov | |
if: ${{ !contains(github.event.head_commit.message, '[skip coverage report]') }} | |
uses: codecov/codecov-action@v3 | |
- name: Lint with flake8 | |
if: ${{ !contains(github.event.head_commit.message, '[skip linting]') }} | |
run: | | |
flake8 src |