From 03c8a31d4535e73f8e363ebc6d76cc740402bdc3 Mon Sep 17 00:00:00 2001 From: Lukas Dullinger <129603980+itislu@users.noreply.github.com> Date: Fri, 26 Jul 2024 04:50:32 +0200 Subject: [PATCH] ci: Use matrix for reusable regression test --- .github/workflows/regression_test.yaml | 7 ++++- .github/workflows/test.yaml | 40 +++++++++++--------------- 2 files changed, 22 insertions(+), 25 deletions(-) diff --git a/.github/workflows/regression_test.yaml b/.github/workflows/regression_test.yaml index cf538f29..0138189b 100644 --- a/.github/workflows/regression_test.yaml +++ b/.github/workflows/regression_test.yaml @@ -5,8 +5,13 @@ on: workflow_call: inputs: test_mode: + description: Test mode (m, b, ne, d, a) required: true type: string + test_name: + description: Name of the test + required: false + type: string outputs: source_failed_count: description: Number of failed test cases on source branch @@ -24,7 +29,7 @@ env: jobs: regression_test: - name: Regression Test + name: ${{ inputs.test_name }} runs-on: ubuntu-latest timeout-minutes: 10 outputs: diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 898054dd..6ccd1728 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -91,30 +91,22 @@ jobs: - name: Combine memory leak test results run: echo "All memory leak tests finished" - mand_regression_test: - name: Mandatory Part Regression Test - needs: compilation_test - uses: ./.github/workflows/regression_test.yaml - with: - test_mode: 'm' - - bonus_regression_test: - name: Bonus Part Regression Test - needs: compilation_test - uses: ./.github/workflows/regression_test.yaml - with: - test_mode: 'b' - - empty_env_regression_test: - name: Empty Env Regression Test - needs: compilation_test - uses: ./.github/workflows/regression_test.yaml - with: - test_mode: 'ne' - - hardcore_regression_test: - name: Hardcore Regression Test + regression_test: + name: Regression Test needs: compilation_test + strategy: + fail-fast: false + matrix: + include: + - test_mode: m + test_name: Mandatory Part + - test_mode: b + test_name: Bonus Part + - test_mode: ne + test_name: Empty Env + - test_mode: d + test_name: Hardcore uses: ./.github/workflows/regression_test.yaml with: - test_mode: 'd' + test_mode: ${{ matrix.test_mode }} + test_name: ${{ matrix.test_name }}