Skip to content

Onboard test coverage to Codecov [RHELDST-40407] #41

Onboard test coverage to Codecov [RHELDST-40407]

Onboard test coverage to Codecov [RHELDST-40407] #41

Workflow file for this run

name: Tox tests
on: [push, pull_request]
jobs:
static:
runs-on: ubuntu-latest
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 static
pidiff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install RPM
run: sudo apt-get install -y rpm
- 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 pidiff
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 cov
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
if: github.event_name == 'pull_request' || (github.event_name == 'push' && github.ref =='refs/heads/master')
with:
use_oidc: true
flags: unit-tests
files: coverage.xml
fail_ci_if_error: false
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install RPM
run: sudo apt-get install -y rpm
- 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 docs
bandit:
runs-on: ubuntu-latest
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 bandit