Skip to content

Commit 2f22f87

Browse files
committed
ci: several changes related to new qemu test, ansible-lint, python versions, ubuntu versions
There is a new QEMU based test which uses the qemu/kvm capability of github action runners. This is the basis for new bootc/image mode tests which we will be rolling out in the near future. ansible-lint requires that the collection path is set so that the requirements it installs are installed in the correct place. There has been some general github action deprecation of python versions and ubuntu versions that we have had to fix. Remove `CONTRIBUTOR` from the list of users who can trigger citest. For more information, see * linux-system-roles/.github#98 * linux-system-roles/.github#94 * linux-system-roles/.github#93 * linux-system-roles/.github#92 * linux-system-roles/.github#91 Signed-off-by: Rich Megginson <rmeggins@redhat.com>
1 parent aa41aba commit 2f22f87

File tree

9 files changed

+93
-15
lines changed

9 files changed

+93
-15
lines changed

.github/workflows/ansible-lint.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
- name: Install tox, tox-lsr
3333
run: |
3434
set -euxo pipefail
35-
pip3 install "git+https://github.com/linux-system-roles/tox-lsr@3.4.0"
35+
pip3 install "git+https://github.com/linux-system-roles/tox-lsr@3.5.1"
3636
3737
- name: Convert role to collection format
3838
id: collection
@@ -80,3 +80,5 @@ jobs:
8080
with:
8181
working_directory: ${{ github.workspace }}/.tox/ansible_collections/${{ env.LSR_ROLE2COLL_NAMESPACE }}/${{ env.LSR_ROLE2COLL_NAME }}
8282
requirements_file: ${{ steps.collection.outputs.coll_req_file }}
83+
env:
84+
ANSIBLE_COLLECTIONS_PATH: ${{ github.workspace }}/.tox

.github/workflows/ansible-managed-var-comment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- name: Install tox, tox-lsr
3131
run: |
3232
set -euxo pipefail
33-
pip3 install "git+https://github.com/linux-system-roles/tox-lsr@3.4.0"
33+
pip3 install "git+https://github.com/linux-system-roles/tox-lsr@3.5.1"
3434
3535
- name: Run ansible-plugin-scan
3636
run: |

.github/workflows/ansible-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
- name: Install tox, tox-lsr
3434
run: |
3535
set -euxo pipefail
36-
pip3 install "git+https://github.com/linux-system-roles/tox-lsr@3.4.0"
36+
pip3 install "git+https://github.com/linux-system-roles/tox-lsr@3.5.1"
3737
3838
- name: Convert role to collection format
3939
run: |

.github/workflows/python-unit-test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ jobs:
2121
pyver_os:
2222
- ver: "2.7"
2323
os: ubuntu-22.04
24-
- ver: "3.8"
25-
os: ubuntu-latest
2624
- ver: "3.9"
2725
os: ubuntu-latest
2826
- ver: "3.10"
2927
os: ubuntu-latest
3028
- ver: "3.11"
3129
os: ubuntu-latest
30+
- ver: "3.12"
31+
os: ubuntu-latest
3232
runs-on: ${{ matrix.pyver_os.os }}
3333
steps:
3434
- name: Update git
@@ -65,7 +65,7 @@ jobs:
6565
tox=tox
6666
virtualenv=virtualenv
6767
fi
68-
pip install "$tox" "$virtualenv" "git+https://github.com/linux-system-roles/tox-lsr@3.4.0"
68+
pip install "$tox" "$virtualenv" "git+https://github.com/linux-system-roles/tox-lsr@3.5.1"
6969
# If you have additional OS dependency packages e.g. libcairo2-dev
7070
# then put them in .github/config/ubuntu-requirements.txt, one
7171
# package per line.
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
---
2+
name: QEMU/KVM Integration tests
3+
on: # yamllint disable-line rule:truthy
4+
pull_request:
5+
merge_group:
6+
branches:
7+
- main
8+
types:
9+
- checks_requested
10+
push:
11+
branches:
12+
- main
13+
workflow_dispatch:
14+
15+
permissions:
16+
contents: read
17+
jobs:
18+
qemu_kvm:
19+
runs-on: ubuntu-latest
20+
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
scenario:
25+
- { image: "centos-9", env: "qemu-ansible-core-2.16" }
26+
- { image: "centos-10", env: "qemu-ansible-core-2.17" }
27+
# ansible/libdnf5 bug: https://issues.redhat.com/browse/RHELMISC-10110
28+
# - { image: "fedora-41", env: "qemu-ansible-core-2.17" }
29+
- { image: "fedora-42", env: "qemu-ansible-core-2.17" }
30+
steps:
31+
- name: Set up /dev/kvm
32+
run: |
33+
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm.rules
34+
sudo udevadm control --reload-rules
35+
sudo udevadm trigger --name-match=kvm --settle
36+
ls -l /dev/kvm
37+
38+
- name: Disable man-db to speed up package install
39+
run: |
40+
echo "set man-db/auto-update false" | sudo debconf-communicate
41+
sudo dpkg-reconfigure man-db
42+
43+
- name: Install test dependencies
44+
run: |
45+
set -euxo pipefail
46+
python3 -m pip install --upgrade pip
47+
sudo apt update
48+
sudo apt install -y --no-install-recommends git ansible-core genisoimage qemu-system-x86
49+
pip3 install "git+https://github.com/linux-system-roles/tox-lsr@3.5.1"
50+
51+
- name: Checkout repo
52+
uses: actions/checkout@v4
53+
54+
- name: Configure tox-lsr
55+
run: |
56+
curl -o ~/.config/linux-system-roles.json https://raw.githubusercontent.com/linux-system-roles/linux-system-roles.github.io/master/download/linux-system-roles.json
57+
58+
- name: Run qemu/kvm tox integration tests
59+
run: tox -e ${{ matrix.scenario.env }} -- --image-name ${{ matrix.scenario.image }} --make-batch --log-level=debug --
60+
61+
- name: Test result summary
62+
if: always()
63+
run: |
64+
set -euo pipefail
65+
while read code start end f; do
66+
if [ "$code" = "0" ]; then
67+
echo -n "PASS: "
68+
else
69+
echo -n "FAIL: "
70+
fi
71+
echo "$(basename $f)"
72+
done < batch.report
73+
74+
- name: Show test logs on failure
75+
if: failure()
76+
run: |
77+
set -euo pipefail
78+
for f in tests/*.log; do
79+
echo "::group::$(basename $f)"
80+
cat "$f"
81+
echo "::endgroup::"
82+
done

.github/workflows/tft.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
if: |
2222
github.event.issue.pull_request
2323
&& contains(github.event.comment.body, '[citest]')
24-
&& (contains(fromJson('["OWNER", "MEMBER", "COLLABORATOR", "CONTRIBUTOR"]'), github.event.comment.author_association)
24+
&& (contains(fromJson('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association)
2525
|| contains('systemroller', github.event.comment.user.login))
2626
runs-on: ubuntu-latest
2727
outputs:

.github/workflows/tft_citest_bad.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
if: |
1212
github.event.issue.pull_request
1313
&& contains(fromJson('["[citest_bad]", "[citest-bad]", "[citest bad]"]'), github.event.comment.body)
14-
&& contains(fromJson('["OWNER", "MEMBER", "COLLABORATOR", "CONTRIBUTOR"]'), github.event.comment.author_association)
14+
&& contains(fromJson('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association)
1515
permissions:
1616
actions: write # for re-running failed jobs: https://docs.github.com/en/rest/actions/workflow-runs?apiVersion=2022-11-28#re-run-a-job-from-a-workflow-run
1717
runs-on: ubuntu-latest

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Kernel Settings Role
22

3-
[![ansible-lint.yml](https://github.com/linux-system-roles/kernel_settings/actions/workflows/ansible-lint.yml/badge.svg)](https://github.com/linux-system-roles/kernel_settings/actions/workflows/ansible-lint.yml) [![ansible-test.yml](https://github.com/linux-system-roles/kernel_settings/actions/workflows/ansible-test.yml/badge.svg)](https://github.com/linux-system-roles/kernel_settings/actions/workflows/ansible-test.yml) [![codeql.yml](https://github.com/linux-system-roles/kernel_settings/actions/workflows/codeql.yml/badge.svg)](https://github.com/linux-system-roles/kernel_settings/actions/workflows/codeql.yml) [![codespell.yml](https://github.com/linux-system-roles/kernel_settings/actions/workflows/codespell.yml/badge.svg)](https://github.com/linux-system-roles/kernel_settings/actions/workflows/codespell.yml) [![markdownlint.yml](https://github.com/linux-system-roles/kernel_settings/actions/workflows/markdownlint.yml/badge.svg)](https://github.com/linux-system-roles/kernel_settings/actions/workflows/markdownlint.yml) [![python-unit-test.yml](https://github.com/linux-system-roles/kernel_settings/actions/workflows/python-unit-test.yml/badge.svg)](https://github.com/linux-system-roles/kernel_settings/actions/workflows/python-unit-test.yml) [![shellcheck.yml](https://github.com/linux-system-roles/kernel_settings/actions/workflows/shellcheck.yml/badge.svg)](https://github.com/linux-system-roles/kernel_settings/actions/workflows/shellcheck.yml) [![tft.yml](https://github.com/linux-system-roles/kernel_settings/actions/workflows/tft.yml/badge.svg)](https://github.com/linux-system-roles/kernel_settings/actions/workflows/tft.yml) [![tft_citest_bad.yml](https://github.com/linux-system-roles/kernel_settings/actions/workflows/tft_citest_bad.yml/badge.svg)](https://github.com/linux-system-roles/kernel_settings/actions/workflows/tft_citest_bad.yml) [![woke.yml](https://github.com/linux-system-roles/kernel_settings/actions/workflows/woke.yml/badge.svg)](https://github.com/linux-system-roles/kernel_settings/actions/workflows/woke.yml)
3+
[![ansible-lint.yml](https://github.com/linux-system-roles/kernel_settings/actions/workflows/ansible-lint.yml/badge.svg)](https://github.com/linux-system-roles/kernel_settings/actions/workflows/ansible-lint.yml) [![ansible-test.yml](https://github.com/linux-system-roles/kernel_settings/actions/workflows/ansible-test.yml/badge.svg)](https://github.com/linux-system-roles/kernel_settings/actions/workflows/ansible-test.yml) [![codeql.yml](https://github.com/linux-system-roles/kernel_settings/actions/workflows/codeql.yml/badge.svg)](https://github.com/linux-system-roles/kernel_settings/actions/workflows/codeql.yml) [![codespell.yml](https://github.com/linux-system-roles/kernel_settings/actions/workflows/codespell.yml/badge.svg)](https://github.com/linux-system-roles/kernel_settings/actions/workflows/codespell.yml) [![markdownlint.yml](https://github.com/linux-system-roles/kernel_settings/actions/workflows/markdownlint.yml/badge.svg)](https://github.com/linux-system-roles/kernel_settings/actions/workflows/markdownlint.yml) [![python-unit-test.yml](https://github.com/linux-system-roles/kernel_settings/actions/workflows/python-unit-test.yml/badge.svg)](https://github.com/linux-system-roles/kernel_settings/actions/workflows/python-unit-test.yml) [![qemu-kvm-integration-tests.yml](https://github.com/linux-system-roles/kernel_settings/actions/workflows/qemu-kvm-integration-tests.yml/badge.svg)](https://github.com/linux-system-roles/kernel_settings/actions/workflows/qemu-kvm-integration-tests.yml) [![shellcheck.yml](https://github.com/linux-system-roles/kernel_settings/actions/workflows/shellcheck.yml/badge.svg)](https://github.com/linux-system-roles/kernel_settings/actions/workflows/shellcheck.yml) [![tft.yml](https://github.com/linux-system-roles/kernel_settings/actions/workflows/tft.yml/badge.svg)](https://github.com/linux-system-roles/kernel_settings/actions/workflows/tft.yml) [![tft_citest_bad.yml](https://github.com/linux-system-roles/kernel_settings/actions/workflows/tft_citest_bad.yml/badge.svg)](https://github.com/linux-system-roles/kernel_settings/actions/workflows/tft_citest_bad.yml) [![woke.yml](https://github.com/linux-system-roles/kernel_settings/actions/workflows/woke.yml/badge.svg)](https://github.com/linux-system-roles/kernel_settings/actions/workflows/woke.yml)
44

55
This role is used to modify kernel settings. For example, on Linux, settings
66
in `/proc/sys` (using `sysctl`), `/sys/fs`, and some other settings. It uses

plans/test_playbooks_parallel.fmf

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,10 @@ provision:
55
# Hence there is no need to define `how` explicitly.
66
- name: control-node1
77
role: control_node
8-
# `connection: system` is required for `how: virtual` to assign VMs a real
9-
# IP making SSH configuration easier.
10-
# This setting is ignored in `artemis`, so we can leave it as is.
11-
connection: system
128
- name: managed-node1
139
role: managed_node
14-
connection: system
1510
- name: managed-node2
1611
role: managed_node
17-
connection: system
1812
environment:
1913
SR_ANSIBLE_VER: 2.17
2014
SR_REPO_NAME: kernel_settings

0 commit comments

Comments
 (0)