Skip to content

Onboard test coverage to Codecov [RHELDST-40401] #335

Onboard test coverage to Codecov [RHELDST-40401]

Onboard test coverage to Codecov [RHELDST-40401] #335

Workflow file for this run

on:
push:
branches:
- master
pull_request:
branches:
- master
name: Run Tox tests
jobs:
tox_test:
name: Tox test
steps:
- name: Checkout kobo
uses: actions/checkout@v2
- name: Run Tox tests
id: test
uses: fedora-python/tox-github-action@main
with:
tox_env: ${{ matrix.tox_env }}
dnf_install: python3-rpm /usr/bin/gcc /usr/bin/krb5-config /etc/mime.types
strategy:
matrix:
tox_env: [
# This list has to be maintained manually :(
# You can get it from `tox -l | sed "s/$/,/"`
py36-django2,
py36-django3,
py39-django2,
py39-django3,
py310-django2,
py310-django3,
py311-django2,
py311-django3,
py39-django4,
py310-django4,
py311-django4,
py312-django4,
py310-django5,
py311-django5,
py312-django5,
py39-bandit,
]
# Use GitHub's Linux Docker host
runs-on: ubuntu-latest
coverage:
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v2
- name: Install RPM
run: sudo apt-get install -y rpm libkrb5-dev
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install Tox
run: pip install tox
- name: Run Tox
run: tox -e py39-django3-cov
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
use_oidc: true
flags: unit-tests
files: coverage.xml
fail_ci_if_error: false