Skip to content

[CI] Add test coverage reporting #2

[CI] Add test coverage reporting

[CI] Add test coverage reporting #2

Workflow file for this run

name: Run tests and upload coverage
on:
push:
pull_request:
jobs:
test:
name: Run tests and collect coverage
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Install dependencies
run: poetry install --with dev
- name: Setup Gardenlinux
uses: gardenlinux/python-gardenlinux-lib/.github/actions/setup@main
- name: Prepare environment
run: make install-test
- name: Run tests
run: make test-coverage-ci
- name: Check for report
run: test -f coverage.xml
- name: Upload results to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}