diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 5637bcc..a8090f0 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -33,3 +33,31 @@ jobs: cache: true - run: | go test -v foo/... + + test-prepare: + runs-on: ubuntu-latest + outputs: + run: ${{ steps.run.outputs.run }} + steps: + - run: echo "run=true" >> $GITHUB_OUTPUT + id: run + + test-1: + runs-on: ubuntu-latest + needs: test-prepare + if: ${{ needs.test-prepare.outputs.run == 'true' }} + steps: + - run: echo 1 + + test-2: + runs-on: ubuntu-latest + needs: test-prepare + if: ${{ needs.test-prepare.outputs.run == 'false' }} + steps: + - run: echo 2 + + test-final: + runs-on: ubuntu-latest + needs: [test-prepare, test-1, test-2] + steps: + - run: echo final