-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
38 additions
and
24 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: | ||
|