Pytest #418
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: Pytest | |
on: | |
schedule: | |
- cron: 0 13 * * 1 # Every Monday at 1PM UTC (9AM EST) | |
pull_request: | |
# test in containerised and OS environments | |
jobs: | |
test-container: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- run: npm install -g @devcontainers/cli@v0.30.0 | |
- run: devcontainer up --workspace-folder=. | |
- run: devcontainer exec --workspace-folder=. poetry run pre-commit run --verbose --all-files | |
- run: devcontainer exec --workspace-folder=. poetry run pytest --cov-report=xml --cov=src | |
- uses: codecov/codecov-action@v1 | |
with: | |
file: coverage.xml | |
pytest: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
- macos-latest | |
python-version: | |
- "3.8" | |
- "3.9" | |
- "3.10" | |
- "3.11" | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- run: pip install poetry | |
- run: poetry install | |
- run: poetry run pytest --cov-report=xml --cov=src | |
- uses: codecov/codecov-action@v1 | |
with: | |
file: coverage.xml |