Skip to content

Commit

Permalink
.github/workflows: add in-memory integration test matrix (#346)
Browse files Browse the repository at this point in the history
* .github/workflows: add integration test matrix

* fix cd

* need to explicitly pass/fail

* reorder

* remove name change
  • Loading branch information
makramkd authored Dec 6, 2024
1 parent 3622193 commit 49803c3
Showing 1 changed file with 29 additions and 26 deletions.
55 changes: 29 additions & 26 deletions .github/workflows/ccip-integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,28 @@ on:
- 'main'

jobs:
integration-test-ccip-ocr3:
integration-test-matrix:
env:
# We explicitly have this env var not be "CL_DATABASE_URL" to avoid having it be used by core related tests
# when they should not be using it, while still allowing us to DRY up the setup
DB_URL: postgresql://postgres:postgres@localhost:5432/chainlink_test?sslmode=disable


strategy:
fail-fast: false
matrix:
type:
- cmd: cd integration-tests/smoke/ccip && go test ccip_fees_test.go -timeout 12m -test.parallel=2 -count=1 -json
name: "Fees Test"
- cmd: cd integration-tests/smoke/ccip && go test ccip_messaging_test.go -timeout 12m -test.parallel=2 -count=1 -json
name: "Messaging Test"
- cmd: cd integration-tests/smoke/ccip && go test ccip_fee_boosting_test.go -timeout 12m -test.parallel=2 -count=1 -json
name: "Fee Boosting Test"
- cmd: cd integration-tests/smoke/ccip && go test ccip_batching_test.go -timeout 12m -test.parallel=2 -count=1 -json
name: "Batching Test"
- cmd: cd integration-tests/contracts && go test ccipreader_test.go -timeout 5m -test.parallel=1 -count=1 -json
name: "CCIPReader Test"

name: Integration Tests (${{ matrix.type.name }})
runs-on: ubuntu-latest
steps:
- name: Checkout the chainlink-ccip repo
Expand Down Expand Up @@ -99,29 +115,16 @@ jobs:
./ccip.test local db preparetest
env:
CL_DATABASE_URL: ${{ env.DB_URL }}
- name: Run ccip ocr3 initial deploy integration test
run: |
cd $GITHUB_WORKSPACE/chainlink/deployment
go test -v -run '^TestAddLanesWithTestRouter$' -timeout 6m ./ccip/changeset
EXITCODE=${PIPESTATUS[0]}
if [ $EXITCODE -ne 0 ]; then
echo "Integration test failed"
else
echo "Integration test passed!"
fi
exit $EXITCODE
env:
CL_DATABASE_URL: ${{ env.DB_URL }}
- name: Run ccip ocr3 add chain integration test
run: |
cd $GITHUB_WORKSPACE/chainlink/deployment
go test -v -run '^TestAddChainInbound$' -timeout 6m ./ccip/changeset
EXITCODE=${PIPESTATUS[0]}
if [ $EXITCODE -ne 0 ]; then
echo "Integration test failed"
else
echo "Integration test passed!"
fi
exit $EXITCODE
- name: Run ${{ matrix.type.name }}
run: cd $GITHUB_WORKSPACE/chainlink/ && ${{ matrix.type.cmd }}
env:
CL_DATABASE_URL: ${{ env.DB_URL }}

integration-test-ccip-ocr3:
if: always()
runs-on: ubuntu-latest
needs: [integration-test-matrix]
steps:
- name: Fail the job if ccip tests in PR not successful
if: always() && needs.integration-test-matrix.result == 'failure'
run: exit 1

0 comments on commit 49803c3

Please sign in to comment.