Skip to content

Improve coverage

Improve coverage #16

Workflow file for this run

name: Code check
on:
push:
branches: ["develop"]
pull_request:
branches: ["develop"]
env:
MYSQL_HOST: ${{ vars.MYSQL_HOST }}
MYSQL_USER: ${{ vars.MYSQL_USER }}
MYSQL_PASSWORD: ${{ vars.MYSQL_PASSWORD }}
MYSQL_PORT: ${{ vars.MYSQL_PORT }}
MYSQL_DBNAME: ${{ vars.MYSQL_DBNAME }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12"]
steps:
- uses: actions/checkout@master
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@master
with:
python-version: ${{ matrix.python-version }}
- name: Trunk Check
uses: trunk-io/trunk-action@main
- name: Tox
run: |
python -m pip install --upgrade pip
python -m pip install -U tox
tox
- if: ${{ github.event_name == 'push' && matrix.python-version == 3.12 }}
name: Export Coverage XML
run: tox -e coverage
- if: ${{ github.event_name == 'push' && matrix.python-version == 3.12 }}
name: Upload coverage reports to Codecov
uses: codecov/codecov-action@main
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./
env_vars: OS,PYTHON
fail_ci_if_error: true
files: ./coverage.xml
name: codecov-bug-tracker
verbose: true