From 619d7d1dfe8c5242d4c979f533922d0885b23aef Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sat, 3 Dec 2022 15:31:03 +0100 Subject: [PATCH] Improve CI image selection. (#536) --- .github/workflows/ansible-test.yml | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ansible-test.yml b/.github/workflows/ansible-test.yml index 9351121c..a6dcf742 100644 --- a/.github/workflows/ansible-test.yml +++ b/.github/workflows/ansible-test.yml @@ -27,7 +27,15 @@ jobs: - '2.9' - '2.10' - '2.11' - runs-on: ubuntu-20.04 + # Ansible-test on various stable branches does not yet work well with cgroups v2. + # Since ubuntu-latest now uses Ubuntu 22.04, we need to fall back to the ubuntu-20.04 + # image for these stable branches. The list of branches where this is necessary will + # shrink over time, check out https://github.com/ansible-collections/news-for-maintainers/issues/28 + # for the latest list. + runs-on: >- + ${{ contains(fromJson( + '["2.9", "2.10", "2.11", "2.12", "2.13", "2.14"]' + ), matrix.ansible) && 'ubuntu-20.04' || 'ubuntu-latest' }} steps: - name: Perform sanity testing uses: felixfontein/ansible-test-gh-action@integration-error-behavior @@ -38,7 +46,15 @@ jobs: testing-type: sanity units: - runs-on: ubuntu-20.04 + # Ansible-test on various stable branches does not yet work well with cgroups v2. + # Since ubuntu-latest now uses Ubuntu 22.04, we need to fall back to the ubuntu-20.04 + # image for these stable branches. The list of branches where this is necessary will + # shrink over time, check out https://github.com/ansible-collections/news-for-maintainers/issues/28 + # for the latest list. + runs-on: >- + ${{ contains(fromJson( + '["2.9", "2.10", "2.11", "2.12", "2.13", "2.14"]' + ), matrix.ansible) && 'ubuntu-20.04' || 'ubuntu-latest' }} name: EOL Units (Ⓐ${{ matrix.ansible }}) strategy: # As soon as the first unit test fails, cancel the others to free up the CI queue @@ -61,7 +77,15 @@ jobs: testing-type: units integration: - runs-on: ubuntu-20.04 + # Ansible-test on various stable branches does not yet work well with cgroups v2. + # Since ubuntu-latest now uses Ubuntu 22.04, we need to fall back to the ubuntu-20.04 + # image for these stable branches. The list of branches where this is necessary will + # shrink over time, check out https://github.com/ansible-collections/news-for-maintainers/issues/28 + # for the latest list. + runs-on: >- + ${{ contains(fromJson( + '["2.9", "2.10", "2.11", "2.12", "2.13", "2.14"]' + ), matrix.ansible) && 'ubuntu-20.04' || 'ubuntu-latest' }} name: EOL I (Ⓐ${{ matrix.ansible }}+${{ matrix.docker }}+py${{ matrix.python }}:${{ matrix.target }}) strategy: fail-fast: false