Skip to content

Commit

Permalink
Move the dependency change higher up
Browse files Browse the repository at this point in the history
  • Loading branch information
tateexon committed Jun 18, 2024
1 parent 33f3e07 commit 1c9dfc6
Showing 1 changed file with 41 additions and 21 deletions.
62 changes: 41 additions & 21 deletions .github/workflows/ci-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,29 @@ jobs:
- name: Setup Go
if: ${{ needs.filter.outputs.changes == 'true' }}
uses: ./.github/actions/setup-go

- name: Setup Github Token
id: get-gh-token
uses: smartcontractkit/.github/actions/setup-github-token@main
with:
aws-role-arn: ${{ secrets.AWS_OIDC_GLOBAL_READ_ONLY_TOKEN_ISSUER_ROLE_ARN }}
aws-lambda-url: ${{ secrets.AWS_INFRA_RELENG_TOKEN_ISSUER_LAMBDA_URL }}
aws-region: ${{ secrets.AWS_REGION }}
set-git-config: "true"
- name: Replace the chainlink-integration deps
if: ${{ needs.filter.outputs.changes == 'true' && inputs.evm-ref != ''}}
shell: bash
env:
MODULE: github.com/smartcontractkit/chainlink-integrations/evm/relayer
COMMIT_HASH: ${{ inputs.evm-ref }}
run: |
# Update to the evm/relayer code we wish to test against
go get ${MODULE}@${COMMIT_HASH}
# push replace into core go.mod, remove this once the evm migration is complete
PSEUDO_VERSION=$(go list -m -mod=mod ${MODULE}@${COMMIT_HASH} | awk '{print $2}')
go mod edit -replace=github.com/smartcontractkit/chainlink/v2/core/chains/evm=${MODULE}@${PSEUDO_VERSION}
go mod tidy
- name: Run short tests
if: ${{ needs.filter.outputs.changes == 'true' && matrix.type.cmd == 'go_core_tests' }}
run: go test -short ./...
Expand All @@ -129,19 +152,6 @@ jobs:
- name: Download Go vendor packages
if: ${{ needs.filter.outputs.changes == 'true' }}
run: go mod download
- name: Replace chainlink-evm deps
if: ${{ needs.filter.outputs.changes == 'true' && inputs.evm-ref != ''}}
shell: bash
run: |
# Put this back in and remove the replace once the migration is complete
#go get github.com/smartcontractkit/chainlink-integrations/evm/relayerm@${{ inputs.evm-ref }}
# push replace into core go.mod
cat <<EOT >> go.mod
replace (
github.com/smartcontractkit/chainlink/v2/core/chains/evm => ./chainlink-integrations/evm/relayer@${{ inputs.evm-ref }}
)
EOT
go mod tidy
- name: Build binary
if: ${{ needs.filter.outputs.changes == 'true' }}
run: go build -o chainlink.test .
Expand Down Expand Up @@ -275,19 +285,29 @@ jobs:
- name: Download Go vendor packages
if: ${{ needs.filter.outputs.changes == 'true' }}
run: go mod download

- name: Setup Github Token
id: get-gh-token
uses: smartcontractkit/.github/actions/setup-github-token@main
with:
aws-role-arn: ${{ secrets.AWS_OIDC_GLOBAL_READ_ONLY_TOKEN_ISSUER_ROLE_ARN }}
aws-lambda-url: ${{ secrets.AWS_INFRA_RELENG_TOKEN_ISSUER_LAMBDA_URL }}
aws-region: ${{ secrets.AWS_REGION }}
set-git-config: "true"
- name: Replace chainlink-integration deps
if: ${{ needs.filter.outputs.changes == 'true' && inputs.evm-ref != ''}}
shell: bash
env:
MODULE: github.com/smartcontractkit/chainlink-integrations/evm/relayer
COMMIT_HASH: ${{ inputs.evm-ref }}
run: |
# Put this back in and remove the replace once the migration is complete
#go get github.com/smartcontractkit/chainlink-integrations/evm/relayerm@${{ inputs.evm-ref }}
# push replace into core go.mod
cat <<EOT >> go.mod
replace (
github.com/smartcontractkit/chainlink/v2/core/chains/evm => ./chainlink-integrations/evm/relayer@${{ inputs.evm-ref }}
)
EOT
# Update to the evm/relayer code we wish to test against
go get ${MODULE}@${COMMIT_HASH}
# push replace into core go.mod, remove this once the evm migration is complete
PSEUDO_VERSION=$(go list -m -mod=mod ${MODULE}@${COMMIT_HASH} | awk '{print $2}')
go mod edit -replace=github.com/smartcontractkit/chainlink/v2/core/chains/evm=${MODULE}@${PSEUDO_VERSION}
go mod tidy
- name: Build binary
if: ${{ needs.filter.outputs.changes == 'true' }}
run: go build -o chainlink.test .
Expand Down

0 comments on commit 1c9dfc6

Please sign in to comment.