Feat/interchaintest #913
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
name: Build & Test | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
- "release/**" | |
permissions: | |
contents: read | |
concurrency: | |
group: ci-${{ github.ref }}-test | |
cancel-in-progress: true | |
jobs: | |
cleanup-runs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: rokroskar/workflow-run-cleanup-action@master | |
env: | |
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main'" | |
run-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: "1.20" | |
check-latest: true | |
- uses: actions/checkout@v4 | |
- name: build | |
run: | | |
make build | |
- name: test & coverage report creation | |
run: | | |
go test ./... -mod=readonly -timeout 12m -race -coverprofile=coverage.txt -covermode=atomic -tags='ledger test_ledger_mock' | |
liveness-test: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: "1.20" | |
check-latest: true | |
- uses: technote-space/get-diff-action@v6 | |
id: git_diff | |
with: | |
PATTERNS: | | |
**/**.go | |
go.mod | |
go.sum | |
# Enable BuildKit | |
- name: Set BuildKit environment variable | |
run: | | |
echo "DOCKER_BUILDKIT=1" >> $GITHUB_ENV | |
- name: start localnet | |
run: | | |
make clean localnet-start | |
if: env.GIT_DIFF | |
- name: test liveness | |
run: | | |
./contrib/localnet/localnet_liveness.sh 100 3 30 localhost | |
if: env.GIT_DIFF | |
upgrade-test: | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: "1.20" | |
check-latest: true | |
- uses: technote-space/get-diff-action@v6 | |
id: git_diff | |
with: | |
PATTERNS: | | |
app/upgrades/**/*.go | |
- name: echo diff | |
run: echo '${{ env.GIT_DIFF }}' | |
# Enable BuildKit | |
- name: Set BuildKit environment variable | |
run: | | |
echo "DOCKER_BUILDKIT=1" >> $GITHUB_ENV | |
- name: start localnet | |
run: | | |
make clean localnet-start-upgrade | |
if: env.GIT_DIFF | |
- name: test upgrade | |
run: | | |
chmod +x -R ./contrib/updates | |
./contrib/updates/upgrade-test.sh | |
if: env.GIT_DIFF |