Skip to content

Commit 563470e

Browse files
committed
fix: correct test-suites output assignment and streamline scheduling logic in e2e workflow
1 parent 309d9f7 commit 563470e

1 file changed

Lines changed: 9 additions & 11 deletions

File tree

.github/workflows/e2e.yml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
runs-on: ubuntu-latest
2424
name: "Clean test resources"
2525
outputs:
26-
test-suites: ${{ steps.test-suites.outputs.test-suites }}
26+
test-suites: ${{ steps.plan.outputs.test-suites }}
2727
steps:
2828
- name: Checkout
2929
uses: actions/checkout@v4
@@ -44,24 +44,22 @@ jobs:
4444
with:
4545
name: cleanup-log
4646
path: cleanup-*.log
47-
- name: Schedule
48-
if: ${{ github.event_name == 'schedule' }}
49-
id: test-suites
47+
- name: Plan
48+
id: plan
5049
run: |
51-
echo 'test-suites=["--workflow-dispatch-only"]' >> "$GITHUB_OUTPUT"
52-
- name: No schedule
53-
if: ${{ github.event_name != 'schedule' }}
54-
id: test-suites
55-
run: |
56-
echo 'test-suites=["--issue-triggered-only", "--command-triggered-only", "--workflow-dispatch-only"]' >> "$GITHUB_OUTPUT"
50+
# Set test-suites output based on event type
51+
if [[ "${{ github.event_name }}" == "schedule" ]]; then
52+
echo 'test-suites=["--workflow-dispatch-only"]' >> "$GITHUB_OUTPUT"
53+
else
54+
echo 'test-suites=["--issue-triggered-only", "--command-triggered-only", "--workflow-dispatch-only"]' >> "$GITHUB_OUTPUT"
55+
fi
5756
e2e:
5857
runs-on: ubuntu-latest
5958
needs: clean
6059
strategy:
6160
matrix:
6261
test-suite: ${{ fromJSON(needs.clean.outputs.test-suites) }}
6362
fail-fast: false
64-
if: ${{ !(github.event_name == 'schedule' && (matrix.test-suite.name == 'issue-triggered' || matrix.test-suite.name == 'command-triggered')) }}
6563
name: "E2E Tests: ${{ matrix.test-suite.description }}"
6664
steps:
6765
- name: Checkout

0 commit comments

Comments
 (0)