Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions .github/workflows/playwright-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,6 @@ jobs:
if: always()
steps:
- name: Check matrix job status
# This step will fail if any of the matrix jobs failed
run: |
if [ "${{ contains(needs.playwright-tests.result, 'failure') }}" = "true" ]; then
echo "One or more jobs in the E2E testing matrix failed"
exit 1
else
echo "All E2E test jobs succeeded"
fi
uses: grafana/plugin-ci-workflows/actions/internal/check-matrix-status@main
with:
results: ${{ needs.playwright-tests.result }}
11 changes: 3 additions & 8 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -249,11 +249,6 @@ jobs:
if: always()
steps:
- name: Check matrix job status
# This step will fail if any of the matrix jobs failed
run: |
if [ "${{ contains(needs.playwright-tests.result, 'failure') }}" = "true" ]; then
echo "One or more jobs in the E2E testing matrix failed"
exit 1
else
echo "All E2E test jobs succeeded"
fi
uses: grafana/plugin-ci-workflows/actions/internal/check-matrix-status@main
with:
results: ${{ needs.playwright-tests.result }}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,14 @@ jobs:
run-playwright: false

run-plugin-validator: true

check-matrix-status:
name: Check smoke tests matrix status
needs: ci
runs-on: ubuntu-arm64-small
if: always()
steps:
- name: Check matrix status
uses: grafana/plugin-ci-workflows/actions/internal/check-matrix-status@main
with:
results: ${{ needs.ci.result }}
23 changes: 23 additions & 0 deletions actions/internal/check-matrix-status/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Check matrix status
description: Check the status of a matrix of jobs and fail if any have failed.

inputs:
results:
description: |
The results of the matrix jobs to check.
Usually set from the `needs` context, like this: `needs.ci.result`
required: true
type: string

runs:
using: composite
steps:
- name: Check matrix job status
run: |
if [ "${{ contains(inputs.results, 'failure') }}" = "true" ]; then
echo "One or more jobs in the matrix failed"
exit 1
else
echo "All jobs in the matrix have succeeded"
fi
shell: bash
Loading