Skip to content

Commit

Permalink
update action
Browse files Browse the repository at this point in the history
  • Loading branch information
boojamya committed May 1, 2024
1 parent 3a6f956 commit 57e92ca
Showing 1 changed file with 38 additions and 24 deletions.
62 changes: 38 additions & 24 deletions .github/workflows/e2e-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,47 +12,61 @@ concurrency:
cancel-in-progress: true

jobs:
prepare-e2e-tests-and-build-binary:
build-docker:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go 1.22
uses: actions/setup-go@v4
- name: Build Docker image
uses: strangelove-ventures/[email protected]
with:
go-version: '^1.22'

- name: Download and unpack heighliner
run: |
curl -L -o heighliner.tar.gz https://github.com/strangelove-ventures/heighliner/releases/download/v1.5.4/heighliner_1.5.4_linux_amd64.tar.gz
tar -xzvf heighliner.tar.gz
- run: "./heighliner build -c noble-forwarding-simd --local --tar-export-path ${{ env.TAR_PATH }}"
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-forwarding-simd
dockerfile: cosmos
build-target: make build
build-dir:
binaries: |
- simapp/build/simd
- name: Publish Tarball as Artifact
uses: actions/upload-artifact@v3
with:
name: ${{ env.ARTIFACT_NAME }}
path: ${{ env.TAR_PATH }}

- name: Generate matrix
id: set-matrix
run: |
# Run the command and convert its output to a JSON array
TESTS=$(cd e2e && go test -list . | grep -v "^ok " | jq -R -s -c 'split("\n")[:-1]')
echo "matrix=${TESTS}" >> $GITHUB_OUTPUT
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.22
uses: actions/setup-go@v4
with:
go-version: '^1.22'

- name: Generate matrix
id: set-matrix
run: |
# Run the command and convert its output to a JSON array
TESTS=$(cd e2e && go test -list . | grep -v "^ok " | jq -R -s -c 'split("\n")[:-1]')
echo "matrix=${TESTS}" >> $GITHUB_OUTPUT
e2e-tests:
needs:
- prepare-e2e-tests-and-build-binary
- build-docker
- prepare-e2e-tests
runs-on: ubuntu-latest
strategy:
matrix:
# names of `make` commands to run tests
test: ${{fromJson(needs.prepare-e2e-tests-and-build-binary.matrix)}}
test: ${{fromJson(needs.prepare-e2e-tests.outputs.matrix)}}
fail-fast: false

steps:
Expand Down

0 comments on commit 57e92ca

Please sign in to comment.