refactor(e2e): improved the e2esuite #240
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: e2e | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
paths: | |
- '**.rs' | |
- '**.go' | |
- '**.toml' | |
- '**.lock' | |
- '.github/workflows/e2e.yml' | |
permissions: | |
contents: read | |
jobs: | |
golangci: | |
name: lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: "1.21" | |
- uses: actions/checkout@v3 | |
- name: golangci-lint | |
uses: golangci/[email protected] | |
with: | |
version: v1.54 | |
args: --timeout 5m | |
working-directory: e2e/interchaintest | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
test: | |
- TestIcaContractChannelHandshake_Ordered_Protobuf | |
- TestIcaContractChannelHandshake_Unordered_Protobuf | |
- TestIcaRelayerInstantiatedChannelHandshake | |
- TestRecoveredIcaContractInstantiatedChannelHandshake | |
- TestIcaContractExecution_Ordered_Protobuf | |
- TestIcaContractExecution_Unordered_Protobuf | |
- TestIcaContractTimeoutPacket_Ordered_Protobuf | |
- TestIcaContractTimeoutPacket_Unordered_Protobuf | |
- TestOwnerCreateIcaContract | |
- TestOwnerPredefinedAction | |
- TestSendCosmosMsgs_Ordered_Protobuf | |
- TestSendCosmosMsgs_Unordered_Protobuf | |
- TestSendWasmMsgsProtobufEncoding | |
- TestMigrateOrderedToUnordered | |
- TestCloseChannel_Protobuf_Unordered | |
name: ${{ matrix.test }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
- name: Build Owner Contract with Docker | |
run: | | |
docker run --rm -v "$(pwd)":/code \ | |
--mount type=volume,source="devcontract_cache_burner",target=/code/contracts/burner/target \ | |
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \ | |
cosmwasm/optimizer:0.15.0 ./testing/contracts/cw-ica-owner | |
- name: Build Callback Contract with Docker | |
run: | | |
docker run --rm -v "$(pwd)":/code \ | |
--mount type=volume,source="devcontract_cache_burner",target=/code/contracts/burner/target \ | |
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \ | |
cosmwasm/optimizer:0.15.0 ./testing/contracts/callback-counter | |
- name: Install cargo-run-script | |
uses: actions-rs/cargo@v1 | |
with: | |
command: install | |
args: cargo-run-script | |
- name: Build Optimized Contract | |
uses: actions-rs/cargo@v1 | |
with: | |
command: run-script | |
args: optimize | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: "1.21" | |
check-latest: true | |
cache-dependency-path: | | |
e2e/interchaintest/go.sum | |
- name: TestContract | |
run: | | |
cd e2e/interchaintest | |
if [[ ${{ matrix.test }} == TestOwner* ]]; then | |
go test -v . -run TestWithOwnerTestSuite -testify.m ${{ matrix.test }} | |
else | |
go test -v . -run TestWithContractTestSuite -testify.m ${{ matrix.test }} | |
fi | |
- name: Upload Diagnostics on Failure | |
uses: actions/upload-artifact@v4 | |
if: ${{ failure() }} | |
continue-on-error: true | |
with: | |
name: '${{ matrix.entrypoint }}-${{ matrix.test }}' | |
path: e2e/diagnostics | |
retention-days: 5 |