From e900553ed57a03dc831555a487cd2c55b7ad2940 Mon Sep 17 00:00:00 2001 From: Vojtech Trefny Date: Thu, 5 Sep 2024 09:59:03 +0200 Subject: [PATCH] ci: Add a GH action to run static analysis on CentOS 10 Stream This runs 'make check' in the latest CentOS 10 Stream container. --- .github/workflows/check-rhel.yml | 38 ++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/check-rhel.yml diff --git a/.github/workflows/check-rhel.yml b/.github/workflows/check-rhel.yml new file mode 100644 index 000000000..ce410fd9f --- /dev/null +++ b/.github/workflows/check-rhel.yml @@ -0,0 +1,38 @@ +name: Static Analysis (RHEL) + +on: + pull_request: + branches: + - rhel10-branch + +jobs: + build: + name: static-analysis-rhel + runs-on: ubuntu-24.04 + env: + CI_IMAGE: quay.io/centos/centos:stream10-development + CI_CONTAINER: blivet-tests + steps: + - name: Checkout libblockdev repository + uses: actions/checkout@v4 + + - name: Install podman + run: | + sudo apt -qq update + sudo apt -y -qq install podman + + - name: Start the container + run: | + podman run -d -t --name ${{ env.CI_CONTAINER }} --privileged --volume "$(pwd):/app" --workdir "/app" ${{ env.CI_IMAGE }} + + - name: Install ansible in the container + run: | + podman exec -it ${{ env.CI_CONTAINER }} bash -c "dnf -y install ansible-core make which" + + - name: Install test dependencies in the container + run: | + podman exec -it ${{ env.CI_CONTAINER }} bash -c "ansible-playbook -i 'localhost,' -c local misc/install-test-dependencies.yml" + + - name: Run static analysis tests in the container + run: | + podman exec -it ${{ env.CI_CONTAINER }} bash -c "make check"