Skip to content

Commit

Permalink
chore(ci): Use Vault for CentOS Stream 8
Browse files Browse the repository at this point in the history
CentOS Stream 8 reached EOL on 2024-05-31. This patch ensures we can
still run EL8-equivalent tests on frozen version of Stream 8.

Since 1.28 only tracks EL8, CentOS Stream 9 specific code is being
dropped as well.
  • Loading branch information
m-horky committed Jun 4, 2024
1 parent 7cf5af5 commit dbb8427
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,8 @@ jobs:
fail-fast: false
matrix:
include:
- name: "CentOS Stream 9"
image: "quay.io/centos/centos:stream9"
pytest_args: ''
- name: "CentOS Stream 8"
image: "quay.io/centos/centos:stream8"
pytest_args: ''

runs-on: ubuntu-latest
container:
Expand All @@ -33,6 +29,10 @@ jobs:
- name: "Checkout repository"
uses: actions/checkout@v3

- name: "Use CentOS Vault"
run: |
sed -i 's|#baseurl=http://mirror|baseurl=http://vault|' /etc/yum.repos.d/CentOS-Stream-*.repo
- name: "Run container-pre-test.sh"
run: |
bash scripts/container-pre-test.sh
Expand All @@ -46,15 +46,14 @@ jobs:
--cov-report 'xml:/tmp/coverage.xml' --junitxml '/tmp/pytest.xml'"
run: |
dbus-run-session \
python3 -m pytest ${{ matrix.pytest_args }}
python3 -m pytest
- name: "Publish coverage"
uses: MishaKav/pytest-coverage-comment@main
if: |
github.event.pull_request.head.repo.full_name == github.repository
&& matrix.name == 'CentOS Stream 9'
with:
title: "Coverage (computed on ${{ matrix.name }})"
title: "Coverage"
report-only-changed-files: true
pytest-xml-coverage-path: /tmp/coverage.xml
junitxml-path: /tmp/pytest.xml
3 changes: 0 additions & 3 deletions scripts/container-pre-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ source /etc/os-release
if [[ $ID == "centos" && $VERSION == "8" ]]; then
dnf config-manager --enable powertools
fi
if [[ $ID == "centos" && $VERSION == "9" ]]; then
dnf config-manager --enable crb
fi

# Install system, build and runtime packages
dnf --setopt install_weak_deps=False install -y \
Expand Down

0 comments on commit dbb8427

Please sign in to comment.