-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* committing to test workflow * rename image * edit chain name * fix image/chain name * fix uid for permissions and add build flags * set daemon startup flag to false * return nil for bridgevalset * add start args * go.mod * simulate flow * lint * add to test more layer chain actions * complete test flow + cleanup * lint
- Loading branch information
1 parent
a048248
commit f8c6d5c
Showing
24 changed files
with
5,857 additions
and
268 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 |
---|---|---|
@@ -0,0 +1,88 @@ | ||
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: | ||
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: layer | ||
dockerfile: cosmos | ||
build-target: make install | ||
binaries: | | ||
- /go/bin/layerd | ||
- name: Publish Tarball as Artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: layer-docker-image | ||
path: ${{ env.TAR_PATH }} | ||
|
||
prepare: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
matrix: ${{ steps.set-matrix.outputs.matrix }} | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Go | ||
uses: actions/setup-go@v5 | ||
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 | ||
test: | ||
needs: | ||
- build | ||
- prepare | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
# names of `make` commands to run tests | ||
test: ${{fromJson(needs.prepare.outputs.matrix)}} | ||
fail-fast: false | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: '1.22' | ||
|
||
- name: Download Tarball Artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: layer-docker-image | ||
|
||
- name: Load Docker Image | ||
run: docker image load -i ${{ env.TAR_PATH }} | ||
|
||
- name: Run Tests | ||
run: cd e2e && go test -race -v -timeout 10m -run ^${{ matrix.test }}$ . |
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 |
---|---|---|
|
@@ -25,4 +25,4 @@ jobs: | |
run: go build -v ./... | ||
|
||
- name: Test | ||
run: go test -v ./... | ||
run: go test -short -v ./... |
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
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
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
Oops, something went wrong.