From f73cd3f3f77da399ac74fb8fa5cd9ee1d6adf3f0 Mon Sep 17 00:00:00 2001 From: Allison Karlitskaya Date: Wed, 13 Mar 2024 14:12:18 +0100 Subject: [PATCH 1/2] .cockpit-ci: pin our container version --- .cockpit-ci/container | 1 + 1 file changed, 1 insertion(+) create mode 100644 .cockpit-ci/container diff --git a/.cockpit-ci/container b/.cockpit-ci/container new file mode 100644 index 000000000000..808144ae3500 --- /dev/null +++ b/.cockpit-ci/container @@ -0,0 +1 @@ +quay.io/cockpit/tasks:2024-03-13 From 8d7bf7bec0febb142bf08b78b82e97223d15a299 Mon Sep 17 00:00:00 2001 From: Allison Karlitskaya Date: Wed, 13 Mar 2024 14:17:38 +0100 Subject: [PATCH 2/2] workflows: run unit-tests in the correct container --- .github/workflows/unit-tests.yml | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 470159c908ab..1dedb97f817f 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -4,9 +4,6 @@ jobs: unit-tests: runs-on: ubuntu-22.04 permissions: {} - container: - image: quay.io/cockpit/tasks:latest - options: --user 1001 strategy: matrix: target: @@ -17,20 +14,24 @@ jobs: - pytest-cov fail-fast: false timeout-minutes: 60 - env: - FORCE_COLOR: 1 - TEST_BROWSER: firefox - CFLAGS: '-O2' steps: - - name: Clone repository - uses: actions/checkout@v4 - with: - # need this to also fetch tags - fetch-depth: 0 - submodules: true - - name: Run unit test timeout-minutes: 30 run: | + set -eux + + IMAGE="$(curl --fail https://raw.githubusercontent.com/${GITHUB_REPOSITORY}/${GITHUB_SHA}/.cockpit-ci/container)" + podman run --network=host --rm --interactive "${IMAGE}" sh -eux <