Skip to content

github: run python-package on any branch #32

github: run python-package on any branch

github: run python-package on any branch #32

Workflow file for this run

name: Coverage
on:
push:
pull_request:
jobs:
coverage:
name: Coverage for ${{ matrix.os }}
strategy:
matrix:
os: ["ubuntu"]
runs-on: ${{ matrix.os }}-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@main
with:
python-version: "3.10"
cache: "pip"
- name: Install poetry
uses: abatilo/actions-poetry@v2
- name: Setup a local virtual environment (if no poetry.toml file)
run: |
poetry config virtualenvs.create true --local
poetry config virtualenvs.in-project true --local
- uses: actions/cache@v3
name: Define a cache for the virtual environment based on the dependencies lock file
with:
path: ./.venv
key: venv-${{ hashFiles('poetry.lock') }}
- name: Install the project dependencies
run: poetry install --with=dev
- name: Run coverage for mokka
run: |
poetry run pytest tests --cov=mokka --cov-report xml
- uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: coverage.lcov,coverage.xml
name: ${{ matrix.os }}