Initial implementation #11
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Integration Tests | |
on: | |
pull_request: | |
paths: | |
- "action.yaml" | |
- ".github/workflows/integration-tests.yaml" | |
jobs: | |
target-unnamed: | |
permissions: {} | |
runs-on: ubuntu-latest | |
steps: | |
- run: sleep 10 | |
target-named: | |
name: Target Named | |
permissions: {} | |
runs-on: ubuntu-latest | |
steps: | |
- run: sleep 10 | |
test-same-workflow: | |
# These permissions are needed to: | |
# - Checkout the repo | |
permissions: | |
contents: read | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./ | |
id: wait-for-job-unnamed | |
with: | |
run-id: ${{ github.run_id }} | |
job-name: target-unnamed | |
- name: Validate wait for unnamed job | |
run: | | |
[[ "$conclusion" == "success" ]] || exit 1 | |
env: | |
conclusion: ${{ steps.wait-for-job-unnamed.outputs.conclusion }} | |
- uses: ./ | |
id: wait-for-job-named | |
with: | |
run-id: ${{ github.run_id }} | |
job-name: Target Named | |
- name: Validate wait for named job | |
run: | | |
[[ "$conclusion" == "success" ]] || exit 1 | |
env: | |
conclusion: ${{ steps.wait-for-job-named.outputs.conclusion }} | |
test-build-workflow: | |
# These permissions are needed to: | |
# - Checkout the repo | |
permissions: | |
contents: read | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: beacon-biosignals/get-workflow-run@v1 | |
id: workflow-run | |
with: | |
workflow-file: target-workflow.yaml | |
commit-sha: ${{ github.event.pull_request.head.sha }} | |
- uses: ./ | |
id: wait-for-job | |
with: | |
run-id: ${{ steps.workflow-run.outputs.run-id }} | |
job-name: Build | |
- name: Validate wait job | |
run: | | |
[[ "$conclusion" == "success" ]] || exit 1 | |
env: | |
conclusion: ${{ steps.wait-for-job.outputs.conclusion }} | |
- run: sleep 10 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: build | |
run-id: ${{ steps.workflow-run.outputs.run-id }} | |
github-token: ${{ github.token }} | |
- name: Validate artifact | |
run: | | |
jq build.json | |
[[ "$(jq -er .run_id build.json)" == "${{ steps.workflow-run.outputs.run-id }}" ]] || exit 1 | |
[[ "$(jq -er .run_attempt build.json)" == "${{ steps.workflow-run.outputs.run-attempt }}" ]] || exit 1 | |
test-missing-workflow: | |
# These permissions are needed to: | |
# - Checkout the repo | |
permissions: | |
contents: read | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./ | |
id: wait-for-job | |
with: | |
run-id: ${{ github.run_id }} | |
job-name: missing | |
timeout: 10 | |
continue-on-error: true | |
- name: Validate timeout | |
run: | | |
[[ "$outcome" == "failure" ]] || exit 1 | |
env: | |
outcome: ${{ steps.wait-for-job.outcome }} |