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
# Builds chains with custom modules and ensures they pass test | |
# TODO: Clean this up into a matrix | |
name: "Custom modules" | |
on: | |
push: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
GO_VERSION: 1.21.0 | |
JQ_VERSION: '1.7' | |
JQ_FORCE: false | |
BIN_NAME: appd | |
jobs: | |
build-spawn: | |
runs-on: ubuntu-latest | |
name: Build Spawn | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: Build Spawn | |
run: make build | |
- uses: actions/upload-artifact@master | |
with: | |
name: spawn | |
path: ./bin/spawn | |
e2e-tests: | |
needs: build-spawn | |
runs-on: ubuntu-latest | |
name: Module Generation | |
steps: | |
- id: go-cache-paths | |
run: | | |
echo "::set-output name=go-build::$(go env GOCACHE)" | |
echo "::set-output name=go-mod::$(go env GOMODCACHE)" | |
- name: 'Setup jq' | |
uses: dcarbone/install-jq-action@v2 | |
with: | |
version: '${{ env.JQ_VERSION }}' | |
force: '${{ env.JQ_FORCE }}' | |
- name: Set up Go ${{ env.GO_VERSION }} | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
# Cache go build cache, used to speedup go test | |
- name: Go Build Cache | |
uses: actions/cache@v2 | |
with: | |
path: ${{ steps.go-cache-paths.outputs.go-build }} | |
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }} | |
# Cache go mod cache, used to speedup builds | |
- name: Go Mod Cache | |
uses: actions/cache@v2 | |
with: | |
path: ${{ steps.go-cache-paths.outputs.go-mod }} | |
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }} | |
- name: Download Spawn Binary | |
uses: actions/download-artifact@master | |
with: | |
name: spawn | |
- name: Binary Permission | |
run: chmod +x ./spawn && ls -l | |
- name: Build Chain | |
run: ./spawn new chain2 --bypass-prompt --bech32=roll --bin=${{env.BIN_NAME}} --no-git --org=rollchains --denom=uroll --debug | |
- name: Module Generation | |
run: | | |
cd chain2 | |
../spawn module new mytestmodule && make proto-gen | |
- name: Unit Test Initial Module | |
run: | | |
cd chain2 | |
go test ./... | |
- name: IBC Middleware Generation | |
run: | | |
cd chain2 | |
../spawn module new mytestmiddleware --ibc-middleware && make proto-gen | |
- name: Unit Test IBC Middleware | |
run: | | |
cd chain2 | |
go test ./... |