From 92e5e437947e52ec2cfb463d50e403b1317b4215 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Po=C5=82awski?= Date: Thu, 8 Feb 2024 18:19:29 +0100 Subject: [PATCH] CI: Add testing based on Centos containers In the release loop upstream changes are merged to Centos every two weeks. This creates a delay in error detection when new tests being added upstream. Running tests in Centos based containers on top of the upstream code more frequently should speed up error detection. --- .github/workflows/test-on-centos.yml | 34 ++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/test-on-centos.yml diff --git a/.github/workflows/test-on-centos.yml b/.github/workflows/test-on-centos.yml new file mode 100644 index 00000000..aed93fff --- /dev/null +++ b/.github/workflows/test-on-centos.yml @@ -0,0 +1,34 @@ +name: Run tests in Centos container + +on: + workflow_dispatch: + schedule: + - cron: '0 1 * * *' + +jobs: + tests-on-centos: + strategy: + matrix: + centos: + - version: "9" + pytest_exclude: 'not (TestBoot and boot)' + - version: "10" + pytest_exclude: 'not (TestBoot and boot)' + name: "Unittests on Centos Stream ${{ matrix.centos.version }}" + runs-on: ubuntu-latest + steps: + - name: "Checkout" + uses: actions/checkout@v4 + - name: "Run in container" + uses: addnab/docker-run-action@v3 + with: + image: quay.io/osbuild/osbuild-ci-c${{ matrix.centos.version }}s + options: --privileged -v ${{ github.workspace }}:/osbuild --workdir /osbuild + run: | + python3 -m pytest \ + --rootdir $(pwd) \ + --ignore $(pwd)/test/src \ + --unsupported-fs btrfs \ + -k "${{ matrix.centos.pytest_exclude }}" \ + -v \ + $(pwd)/test/