update release.yml to generate binaries.json #610
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 | |
- master | |
- "release/*" | |
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/[email protected] | |
with: | |
go-version: 1.18 | |
- uses: actions/checkout@v3 | |
- 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@v3 | |
- uses: actions/[email protected] | |
with: | |
go-version: 1.18 | |
- uses: technote-space/get-diff-action@v4 | |
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@v3 | |
- uses: actions/[email protected] | |
with: | |
go-version: 1.18 | |
- uses: technote-space/get-diff-action@v4 | |
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 |