Skip to content

chore: fix simulation tests #201

chore: fix simulation tests

chore: fix simulation tests #201

Workflow file for this run

name: End to End Tests
on:
pull_request:
env:
TAR_PATH: heighliner.tar
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-docker:
runs-on: ubuntu-latest
steps:
- name: Build Docker image
uses: strangelove-ventures/[email protected]
with:
registry: "" # empty registry, image only shared for e2e testing
tag: local # emulate local environment for consistency in interchaintest cases
tar-export-path: ${{ env.TAR_PATH }} # export a tarball that can be uploaded as an artifact for the e2e jobs
platform: linux/amd64 # test runner architecture only
git-ref: ${{ github.head_ref }} # source code ref
# Heighliner chains.yaml config
chain: noble
dockerfile: cosmos
build-target: make install
build-env: |
- GOPRIVATE=github.com/circlefin/noble-cctp
pre-build: |
mkdir -p ~/.ssh
echo "${{ secrets.GITAUTH }}" | base64 -d > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
apk add openssh
git config --global --add url."[email protected]:circlefin/noble-cctp.git".insteadOf "https://github.com/circlefin/noble-cctp"
ssh-keyscan github.com >> ~/.ssh/known_hosts
binaries: |
- /go/bin/nobled
- name: Publish Tarball as Artifact
uses: actions/upload-artifact@v3
with:
name: noble-docker-image
path: ${{ env.TAR_PATH }}
prepare-e2e-tests:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go 1.21
uses: actions/setup-go@v4
with:
go-version: '^1.21'
- name: CCTP private repo auth
run: |
mkdir -p ~/.ssh
echo "${{ secrets.GITAUTH }}" | base64 -d > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
ssh-keyscan github.com >> ~/.ssh/known_hosts
export GOPRIVATE=github.com/circlefin/noble-cctp
git config --global --add url."[email protected]:circlefin/noble-cctp.git".insteadOf "https://github.com/circlefin/noble-cctp"
- name: Generate matrix
id: set-matrix
run: |
# Run the command and convert its output to a JSON array
TESTS=$(cd interchaintest && go test -list . | grep -v "^ok " | jq -R -s -c 'split("\n")[:-1]')
echo "matrix=${TESTS}" >> $GITHUB_OUTPUT
e2e-tests:
needs:
- build-docker
- prepare-e2e-tests
runs-on: ubuntu-latest
strategy:
matrix:
# names of `make` commands to run tests
test: ${{fromJson(needs.prepare-e2e-tests.outputs.matrix)}}
fail-fast: false
steps:
- name: Set up Go 1.21
uses: actions/setup-go@v4
with:
go-version: '^1.21'
- name: checkout chain
uses: actions/checkout@v4
- name: CCTP private repo auth
run: |
mkdir -p ~/.ssh
echo "${{ secrets.GITAUTH }}" | base64 -d > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
ssh-keyscan github.com >> ~/.ssh/known_hosts
export GOPRIVATE=github.com/circlefin/noble-cctp
git config --global --add url."[email protected]:circlefin/noble-cctp.git".insteadOf "https://github.com/circlefin/noble-cctp"
- name: Download Tarball Artifact
uses: actions/download-artifact@v3
with:
name: noble-docker-image
- name: Load Docker Image
run: docker image load -i ${{ env.TAR_PATH }}
- name: run test
run: cd interchaintest && go test -race -v -timeout 30m -run ^${{ matrix.test }}$ .