Skip to content

Commit

Permalink
CRIB-542: crib-integration-tests GH workflow running on push to develop
Browse files Browse the repository at this point in the history
Because our crib-integration-tests runs only on schedule, the PR issuer never really gets the feedback that their change broke CRIB when/after merging to develop, and the CRIB team gets notified at most once a day if `develop` is broken. That + timezone differences between team mates can prolong the resolution of the problem.

This PR embeds the crib-integration-tests.yml workflow into the already existing build-publish-develop-pr.yml, since `workflow_run` doesn't provide feedback in the context of a PR/push as well (see https://stackoverflow.com/questions/63343937/how-to-use-the-github-actions-workflow-run-event#comment134992476_65081720) we'd have a check running per PR/push to develop but completely detached from the commit ref, which defeats the purpose of establishing a feedback loop.

Keeping these workflows splitted would incur in potential race conditions, such as running tests by pulling a docker tag that doesn't yet exist, or worse: exists but with a different content than the one from the actual commit ref.
  • Loading branch information
rafaelfelix committed Dec 13, 2024
1 parent 6f42463 commit fcc6d6b
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/build-publish-develop-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,3 +154,26 @@ jobs:
goreleaser-release-type: "merge"
goreleaser-config: .goreleaser.develop.yaml
goreleaser-key: ${{ secrets.GORELEASER_KEY }}

crib-integration-test:
if: ${{ github.event.inputs.git_ref || github.ref }} == 'refs/heads/develop'
runs-on: ubuntu-latest
needs: [split, image-tag]
permissions:
id-token: write
steps:
- name: Assume role capable of dispatching action
uses: smartcontractkit/.github/actions/setup-github-token@ef78fa97bf3c77de6563db1175422703e9e6674f # [email protected]
id: get-gh-token
with:
aws-role-arn: ${{ secrets.AWS_OIDC_CHAINLINK_CI_AUTO_PR_TOKEN_ISSUER_ROLE_ARN }}
aws-lambda-url: ${{ secrets.AWS_INFRA_RELENG_TOKEN_ISSUER_LAMBDA_URL }}
aws-region: ${{ secrets.AWS_REGION }}

- uses: convictional/trigger-workflow-and-wait@f69fa9eedd3c62a599220f4d5745230e237904be #v1.6.5
with:
owner: smartcontractkit
repo: chainlink
github_token: ${{ steps.get-gh-token.outputs.access-token }}
workflow_file_name: crib-integration-test.yml
client_payload: '{"git_ref": "${{ env.GIT_REF }}", "image-tag": "${{ needs.image-tag.outputs.image-tag }}"}'

0 comments on commit fcc6d6b

Please sign in to comment.