Skip to content

[pre-commit.ci] pre-commit autoupdate #167

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #167

Workflow file for this run

name: Codecov
on:
workflow_dispatch:
push:
branches:
- "*"
paths-ignore:
- 'README.md'
- '**/README.md'
- 'pyproject.toml'
- '**/pyproject.toml'
pull_request:
branches:
- "*"
paths-ignore:
- 'README.md'
- '**/README.md'
- 'pyproject.toml'
- '**/pyproject.toml'
types:
- opened
- reopened
jobs:
pre_job:
# continue-on-error: true # Uncomment once integration is finished
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v4
with:
# All of these options are optional, so you can remove them if you are happy with the defaults
concurrent_skipping: 'same_content'
skip_after_successful_duplicate: 'true'
paths_ignore: '["**/README.md", "**/docs/**", "**/pyproject.toml"]'
do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]'
pytest:
needs: pre_job
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
name: Codecov Uploader
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, ubuntu-latest]
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
exclude:
- os: ubuntu-latest
python-version: "3.6"
- os: ubuntu-20.04
python-version: "3.7"
- os: ubuntu-20.04
python-version: "3.8"
- os: ubuntu-20.04
python-version: "3.9"
- os: ubuntu-20.04
python-version: "3.10"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Install poetry
run: pipx install poetry
- name: Set up python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'poetry'
- run: |
poetry install && poetry install -E aiomysql -E aiopg
- name: Run ${{ matrix.python-version }} tests and collect coverage
run: poetry run pytest --cov . --cov-report=xml
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v3