Skip to content

Commit

Permalink
ci: run a job on test suite success
Browse files Browse the repository at this point in the history
- Run a job after all the jobs in the dynamically built test matrix run
  to completion. This job is useful for branch protection rules that
  that need the whole test suite to run successfully.
- Fix linting issues.

Fix #5686
  • Loading branch information
ferrarimarco committed May 24, 2024
1 parent c4eb4c2 commit 526bb1b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
18 changes: 17 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ jobs:
- name: Update action.yml
run: |
echo "yq version: $(yq --version)"
yq '.runs.image = env(CONTAINER_IMAGE_ID)' -i action.yml
yq '.runs.image = "docker://" + env(CONTAINER_IMAGE_ID)' -i action.yml
echo "Action file contents:"
cat action.yml
Expand Down Expand Up @@ -253,6 +253,22 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# The purpose of this job is to run only when the run-test-suite job runs to completion.
# We can use this job as a required status check in a branch protection rule without
# having to select each individual job that dynamically add to the test matrix.
test-success-placeholder:
name: Check if all the tests passed
runs-on: ubuntu-latest
permissions:
contents: read
needs:
- run-test-suite
- test-local-action
steps:
- name: Test suite check
run: |
Test suite completed
preview-release-notes:
if: github.event_name == 'pull_request' && github.repository == github.event.pull_request.head.repo.full_name && github.repository == 'super-linter/super-linter'
runs-on: ubuntu-latest
Expand Down
1 change: 0 additions & 1 deletion test/linters/github_actions/actions_good_01.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ jobs:
github_actions_good:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- if: ${{ github.actor == 'dependabot[bot]' }}
run: |
# CMD
Expand Down

0 comments on commit 526bb1b

Please sign in to comment.