ci-test.yml: Upload coverage to Codecov uses: codecov/codecov-action@v4 #37
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
# This workflow will install Python dependencies, run tests, and lint with a single version of Python | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: CI | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
permissions: | |
contents: read | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.8" | |
- name: Install dependencies | |
run: | | |
export POETRY_VERSION=1.7.1 | |
curl -sSL https://install.python-poetry.org | python3 - | |
poetry install --no-ansi --no-root | |
- name: Lint with ruff | |
run: | | |
poetry run ruff check --diff . | |
- name: Format with ruff | |
run: | | |
poetry run ruff format --check --diff . | |
- name: Check type hints mypy | |
run: | | |
poetry run mypy . | |
- name: Test with pytest | |
run: | | |
poetry run coverage run -m pytest -p pytest_lazy_fixtures.plugin && \ | |
poetry run coverage report && \ | |
poetry run coverage xml -o cov.xml | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
env_vars: OS,PYTHON | |
fail_ci_if_error: true | |
files: ./cov.xml | |
flags: unittests | |
name: codecov-umbrella | |
verbose: true |