Skip to content

Commit

Permalink
.github/workflows: fix integration test workflow (#66)
Browse files Browse the repository at this point in the history
* try something else

* use actions/checkout to checkout ccip repo

* reference correct action

* fix checkout

---------

Co-authored-by: Will Winder <[email protected]>
  • Loading branch information
makramkd and winder authored Aug 19, 2024
1 parent 8747a57 commit 5426034
Showing 1 changed file with 21 additions and 11 deletions.
32 changes: 21 additions & 11 deletions .github/workflows/ccip-integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
matrix:
go-version: ['1.22.5']
steps:
- name: Checkout the repo
- name: Checkout the chainlink-ccip repo
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
Expand All @@ -27,35 +27,45 @@ jobs:
- name: Display Go version
run: go version
- name: Clone CCIP repo
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
with:
repository: smartcontractkit/ccip
ref: ccip-develop
path: ccip
- name: Get the correct commit SHA via GitHub API
id: get_sha
run: |
git clone https://github.com/smartcontractkit/ccip.git
cd ccip
git fetch
git checkout ccip-develop
if [ "${{ github.event_name }}" == "pull_request" ]; then
COMMIT_SHA=${{ github.event.pull_request.head.sha }}
else
COMMIT_SHA=$(curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/${{ github.repository }}/commits/${{ github.ref }}" | jq -r .sha)
fi
echo "::set-output name=sha::$COMMIT_SHA"
- name: Update chainlink-ccip dependency in ccip
run: |
cd ccip
go get github.com/smartcontractkit/chainlink-ccip@${{ github.event.pull_request.head.sha }}
cd $GITHUB_WORKSPACE/ccip
go get github.com/smartcontractkit/chainlink-ccip@${{ steps.get_sha.outputs.sha }}
make gomodtidy
- name: Setup Postgres
uses: ./.github/actions/setup-postgres
- name: Download Go vendor packages
run: |
cd ccip
cd $GITHUB_WORKSPACE/ccip
go mod download
- name: Build binary
run: |
cd ccip
cd $GITHUB_WORKSPACE/ccip
go build -o ccip.test .
- name: Setup DB
run: |
cd ccip
cd $GITHUB_WORKSPACE/ccip
./ccip.test local db preparetest
env:
CL_DATABASE_URL: ${{ env.DB_URL }}
- name: Run ccip ocr3 integration test
run: |
cd ccip
cd $GITHUB_WORKSPACE/ccip
go test -v -timeout 3m -run "^TestIntegration_OCR3Nodes$" ./core/capabilities/ccip/ccip_integration_tests
EXITCODE=${PIPESTATUS[0]}
if [ $EXITCODE -ne 0 ]; then
Expand Down

0 comments on commit 5426034

Please sign in to comment.