From 245930dd865842ad743e67d8a557e970d07d4f0c Mon Sep 17 00:00:00 2001 From: "F.Tibor" Date: Mon, 8 Sep 2025 10:27:59 +0200 Subject: [PATCH 1/3] Use local runner script to run tests in CI (single process) --- .github/workflows/foss.yaml | 38 +++++++++++-------------------------- 1 file changed, 11 insertions(+), 27 deletions(-) diff --git a/.github/workflows/foss.yaml b/.github/workflows/foss.yaml index 5808108c..cffd7f72 100644 --- a/.github/workflows/foss.yaml +++ b/.github/workflows/foss.yaml @@ -24,7 +24,7 @@ concurrency: cancel-in-progress: true jobs: - # TODO: Generalize to handle multiple projects + # TODO: Parallelize the running of projects foss_ubuntu_test: name: "Test rules on FOSS project: yaml-cpp" runs-on: ubuntu-24.04 @@ -36,20 +36,12 @@ jobs: - name: Setup environment uses: ./.github/platform_environment_setup/ubuntu - - name: Setup yaml-cpp - run: | - cd test/foss/yaml-cpp - sh init.sh + - name: Install pytest + run: pip3 install pytest - - name: Run Bazel CodeChecker - run: | - cd test/foss/yaml-cpp/test-proj - bazel build :codechecker_test - - - name: Run Per-File Bazel CodeChecker - run: | - cd test/foss/yaml-cpp/test-proj - bazel build :code_checker_test + - name: Run Test On Opensource Projects + working-directory: test/foss + run: pytest . -v foss_rhel_test: name: "Test rules on FOSS project: yaml-cpp" @@ -63,17 +55,9 @@ jobs: - name: Setup environment uses: ./.github/platform_environment_setup/rhel9 - - name: Setup yaml-cpp - run: | - cd test/foss/yaml-cpp - sh init.sh - - - name: Run Bazel CodeChecker - run: | - cd test/foss/yaml-cpp/test-proj - bazel build :codechecker_test + - name: Install pytest + run: pip3 install pytest - - name: Run Per-File Bazel CodeChecker - run: | - cd test/foss/yaml-cpp/test-proj - bazel build :code_checker_test + - name: Run Test On Opensource Projects + working-directory: test/foss + run: pytest . -v From 8a8bd44154d7918747a521c4bdaadf5596644950 Mon Sep 17 00:00:00 2001 From: "F.Tibor" Date: Mon, 8 Sep 2025 15:02:40 +0200 Subject: [PATCH 2/3] Rename jobs --- .github/workflows/foss.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/foss.yaml b/.github/workflows/foss.yaml index cffd7f72..0b378943 100644 --- a/.github/workflows/foss.yaml +++ b/.github/workflows/foss.yaml @@ -26,7 +26,7 @@ concurrency: jobs: # TODO: Parallelize the running of projects foss_ubuntu_test: - name: "Test rules on FOSS project: yaml-cpp" + name: "Test rules on FOSS projects (ubuntu)" runs-on: ubuntu-24.04 steps: @@ -44,7 +44,7 @@ jobs: run: pytest . -v foss_rhel_test: - name: "Test rules on FOSS project: yaml-cpp" + name: "Test rules on FOSS projects (RHEL)" runs-on: ubuntu-24.04 container: redhat/ubi9:latest From 9faaf7a7ef53c7241e635124eecfc278345c8daa Mon Sep 17 00:00:00 2001 From: "F.Tibor" Date: Wed, 10 Sep 2025 08:48:26 +0200 Subject: [PATCH 3/3] Remove pytest --- .github/workflows/foss.yaml | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/.github/workflows/foss.yaml b/.github/workflows/foss.yaml index 0b378943..55481f39 100644 --- a/.github/workflows/foss.yaml +++ b/.github/workflows/foss.yaml @@ -36,12 +36,9 @@ jobs: - name: Setup environment uses: ./.github/platform_environment_setup/ubuntu - - name: Install pytest - run: pip3 install pytest - - name: Run Test On Opensource Projects - working-directory: test/foss - run: pytest . -v + working-directory: test + run: python3 -m unittest foss/test_foss.py -vvv foss_rhel_test: name: "Test rules on FOSS projects (RHEL)" @@ -55,9 +52,6 @@ jobs: - name: Setup environment uses: ./.github/platform_environment_setup/rhel9 - - name: Install pytest - run: pip3 install pytest - - name: Run Test On Opensource Projects - working-directory: test/foss - run: pytest . -v + working-directory: test + run: python3 -m unittest foss/test_foss.py -vvv