CI: use sudo, assume docker present, use diff-{quality,cover}, bump EL 7 test to EL 8 as EL 7 is EOL #9
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Run CI checks | |
on: [pull_request] | |
jobs: | |
unittests-fedora: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the repo | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install required packages | |
run: sudo apt-get install make diff-cover pylint | |
- name: Run the tests | |
run: sudo make container-unittests-fedora | |
- name: Generate coverage.xml | |
run: coverage xml | |
- name: Run diff-cover | |
run: diff-cover coverage.xml --compare-branch=$GITHUB_BASE_REF --fail-under=90 | |
- name: Run diff-quality (pylint) | |
# we want to run this regardless of whether previous lint steps failed | |
if: success() || failure() | |
run: diff-quality --compare-branch=$GITHUB_BASE_REF --violations=pylint --fail-under=90 --include oz oz-install oz-customize oz-cleanup-cache oz-generate-icicle | |
- name: Run diff-quality (flake8) | |
# we want to run this regardless of whether previous lint steps failed | |
if: success() || failure() | |
run: diff-quality --compare-branch=$GITHUB_BASE_REF --violations=flake8 --fail-under=90 --include oz oz-install oz-customize oz-cleanup-cache oz-generate-icicle | |
unittests-el7: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the repo | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install make | |
run: sudo apt-get install make diff-cover | |
- name: Run the tests | |
run: sudo make container-unittests-el7 |