Skip to content

Commit

Permalink
Merge pull request #311 from pentamassiv/sequential_workflows
Browse files Browse the repository at this point in the history
Only run the tests if the build Workflow succeeded
  • Loading branch information
pentamassiv authored Aug 15, 2024
2 parents 9ca8cb6 + b365e76 commit 0dfe843
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 9 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
pull_request:
branches:
- main
push:
branches:
- main

env:
CARGO_TERM_COLOR: always
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/failing_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,18 @@ permissions:
contents: read
on:
workflow_dispatch:
pull_request:
branches:
- main
workflow_run:
workflows: ["Integration"]
types:
- completed

env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1

jobs:
additional_tests:
if: ${{ github.event.workflow_run.conclusion == 'success' }} # Only run if the integration tests succeeded
strategy:
fail-fast: false
matrix:
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,18 @@ permissions:
contents: read
on:
workflow_dispatch:
pull_request:
branches:
- main
workflow_run:
workflows: ["Build"]
types:
- completed

env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1

jobs:
integration:
if: ${{ github.event.workflow_run.conclusion == 'success' }} # Only run if the build succeeded
strategy:
fail-fast: false
matrix:
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,18 @@ permissions:
contents: read
on:
workflow_dispatch:
pull_request:
branches:
- main
workflow_run:
workflows: ["Build"]
types:
- completed

env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1

jobs:
test:
if: ${{ github.event.workflow_run.conclusion == 'success' }} # Only run if the build succeeded
strategy:
fail-fast: false
matrix:
Expand Down

0 comments on commit 0dfe843

Please sign in to comment.