Skip to content

Commit

Permalink
ci: Use matrix for reusable regression test
Browse files Browse the repository at this point in the history
  • Loading branch information
itislu committed Jul 26, 2024
1 parent f3945dc commit 03c8a31
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 25 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/regression_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -24,7 +29,7 @@ env:

jobs:
regression_test:
name: Regression Test
name: ${{ inputs.test_name }}
runs-on: ubuntu-latest
timeout-minutes: 10
outputs:
Expand Down
40 changes: 16 additions & 24 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

0 comments on commit 03c8a31

Please sign in to comment.