Skip to content

Commit 717019f

Browse files
committed
ci: Add Fedora 42; use tox-lsr 3.9.0; use lsr-report-errors for qemu tests
Add Fedora 42 to testing farm test matrix, drop Fedora 40 Use tox-lsr 3.9.0 for the `--lsr-report-errors-url` argument. Add the argument `--lsr-report-errors-url DEFAULT` to the qemu test so that the errors will be written to the output log. This uses the output callback https://github.com/linux-system-roles/auto-maintenance/blob/main/callback_plugins/lsr_report_errors.py Use the check_logs.py script https://github.com/linux-system-roles/auto-maintenance/blob/main/check_logs.py with the `--github-action-format` argument to format the errors in a github action friendly manner. Rename the log files `-FAIL.log` or `-SUCCESS.log` depending on status. This is compatible with the way the testing farm log files are named, and makes it easy to tell if a test passed or failed from the log file name. Upload README.html as artifacts of the build_docs job for debugging Signed-off-by: Rich Megginson <[email protected]>
1 parent fc69b62 commit 717019f

File tree

7 files changed

+29
-16
lines changed

7 files changed

+29
-16
lines changed

.github/workflows/ansible-lint.yml

Lines changed: 1 addition & 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.8.0"
35+
pip3 install "git+https://github.com/linux-system-roles/tox-lsr@3.9.0"
3636
3737
- name: Convert role to collection format
3838
id: collection

.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.8.0"
33+
pip3 install "git+https://github.com/linux-system-roles/tox-lsr@3.9.0"
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.8.0"
36+
pip3 install "git+https://github.com/linux-system-roles/tox-lsr@3.9.0"
3737
3838
- name: Convert role to collection format
3939
run: |

.github/workflows/build_docs.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,12 @@ jobs:
9090
if: env.RELEASE_VERSION == 'latest'
9191
run: cp ${{ env.RELEASE_VERSION }}/README.html docs/index.html
9292

93+
- name: Upload README.html as an artifact
94+
uses: actions/upload-artifact@master
95+
with:
96+
name: README.html
97+
path: ${{ env.RELEASE_VERSION }}/README.html
98+
9399
- name: Commit changes
94100
run: |
95101
git config --global user.name "${{ github.actor }}"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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.8.0"
68+
pip install "$tox" "$virtualenv" "git+https://github.com/linux-system-roles/tox-lsr@3.9.0"
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.

.github/workflows/qemu-kvm-integration-tests.yml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ jobs:
105105
python3 -m pip install --upgrade pip
106106
sudo apt update
107107
sudo apt install -y --no-install-recommends git ansible-core genisoimage qemu-system-x86
108-
pip3 install "git+https://github.com/linux-system-roles/tox-lsr@3.8.0"
108+
pip3 install "git+https://github.com/linux-system-roles/tox-lsr@3.9.0"
109109
110110
- name: Configure tox-lsr
111111
if: steps.check_platform.outputs.supported
@@ -117,7 +117,8 @@ jobs:
117117
if: steps.check_platform.outputs.supported && startsWith(matrix.scenario.env, 'qemu')
118118
run: >-
119119
tox -e ${{ matrix.scenario.env }} -- --image-name ${{ matrix.scenario.image }} --make-batch
120-
--log-level=debug --skip-tags tests::infiniband,tests::nvme,tests::scsi --
120+
--log-level debug --skip-tags tests::infiniband,tests::nvme,tests::scsi
121+
--lsr-report-errors-url DEFAULT --
121122
122123
- name: Qemu result summary
123124
if: steps.check_platform.outputs.supported && startsWith(matrix.scenario.env, 'qemu') && always()
@@ -127,15 +128,18 @@ jobs:
127128
# actual test playbook that starts with tests_
128129
while read code start end test_files; do
129130
for f in $test_files; do
130-
f="$(basename $f)"
131+
test_file="$f"
132+
f="$(basename $test_file)"
131133
if [[ "$f" =~ ^tests_ ]]; then
132134
break
133135
fi
134136
done
135137
if [ "$code" = "0" ]; then
136138
echo -n "PASS: "
139+
mv "$test_file.log" "${test_file}-SUCCESS.log"
137140
else
138141
echo -n "FAIL: "
142+
mv "$test_file.log" "${test_file}-FAIL.log"
139143
fi
140144
echo "$f"
141145
done < batch.report
@@ -151,8 +155,10 @@ jobs:
151155
for t in tests/tests_*.yml; do
152156
if tox -e ${{ matrix.scenario.env }} -- --image-name ${{ matrix.scenario.image }} $t > ${t}.log 2>&1; then
153157
echo "PASS: $(basename $t)"
158+
mv "${t}.log" "${t}-SUCCESS.log"
154159
else
155160
echo "FAIL: $(basename $t)"
161+
mv "${t}.log" "${t}-FAIL.log"
156162
rc=1
157163
fi
158164
done
@@ -175,13 +181,14 @@ jobs:
175181
if: steps.check_platform.outputs.supported && failure()
176182
run: |
177183
set -euo pipefail
178-
for f in tests/*.log; do
179-
if FAIL=$(grep -E -B100 -A30 "fatal:|An exception occurred" "$f"); then
180-
echo "::group::$(basename $f)"
181-
echo "$FAIL"
182-
echo "::endgroup::"
183-
fi
184+
# grab check_logs.py script
185+
curl -s -L -o check_logs.py https://raw.githubusercontent.com/linux-system-roles/auto-maintenance/refs/heads/main/check_logs.py
186+
chmod +x check_logs.py
187+
declare -a cmdline=(./check_logs.py --github-action-format)
188+
for log in tests/*-FAIL.log; do
189+
cmdline+=(--lsr-error-log "$log")
184190
done
191+
"${cmdline[@]}"
185192
186193
- name: Set commit status as success with a description that platform is skipped
187194
if: ${{ steps.check_platform.outputs.supported == '' }}

.github/workflows/tft.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ jobs:
7272
meta_main=meta/main.yml
7373
# All Fedora are supported, add latest Fedora versions to supported_platforms
7474
if yq '.galaxy_info.galaxy_tags[]' "$meta_main" | grep -qi fedora$; then
75-
supported_platforms+=" Fedora-40"
7675
supported_platforms+=" Fedora-41"
76+
supported_platforms+=" Fedora-42"
7777
fi
7878
# Specific Fedora versions supported
7979
if yq '.galaxy_info.galaxy_tags[]' "$meta_main" | grep -qiP 'fedora\d+$'; then
@@ -98,10 +98,10 @@ jobs:
9898
fail-fast: false
9999
matrix:
100100
include:
101-
- platform: Fedora-40
102-
ansible_version: 2.17
103101
- platform: Fedora-41
104102
ansible_version: 2.17
103+
- platform: Fedora-42
104+
ansible_version: 2.17
105105
- platform: CentOS-7-latest
106106
ansible_version: 2.9
107107
- platform: CentOS-Stream-8

0 commit comments

Comments
 (0)