-
Notifications
You must be signed in to change notification settings - Fork 210
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(tests): e2e test network upgrades
Signed-off-by: Artur Troian <[email protected]>
- Loading branch information
Showing
19 changed files
with
1,454 additions
and
32 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,8 +10,44 @@ on: | |
- v* | ||
|
||
jobs: | ||
ensure-dry-run: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Ensure release/dry-run PASS | ||
uses: lewagon/[email protected] | ||
with: | ||
ref: ${{ github.ref }} | ||
check-name: 'dry-run' | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
wait-interval: 10 | ||
allowed-conclusions: success | ||
ensure-tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Ensure tests PASS | ||
uses: lewagon/[email protected] | ||
with: | ||
ref: ${{ github.ref }} | ||
check-name: 'tests' | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
wait-interval: 10 | ||
allowed-conclusions: success | ||
ensure-tools: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Ensure tools PASS | ||
uses: lewagon/[email protected] | ||
with: | ||
ref: ${{ github.ref }} | ||
check-name: 'tools' | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
wait-interval: 10 | ||
allowed-conclusions: success | ||
publish: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- ensure-dry-run | ||
- ensure-tests | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: git fetch --prune --unshallow | ||
|
@@ -27,10 +63,7 @@ jobs: | |
uses: docker/setup-buildx-action@v2 | ||
- name: release version | ||
run: echo "RELEASE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV | ||
- if: (github.ref == 'refs/heads/master') || (github.ref == 'refs/heads/mainnet/main') | ||
name: release dry-run GORELEASER_SKIP_VALIDATE=true | ||
run: make release-dry-run GORELEASER_SKIP_VALIDATE=true | ||
- name: release dry-run | ||
- name: release | ||
run: make release | ||
- name: Login to GHCR | ||
uses: docker/login-action@v2 | ||
|
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,43 @@ | ||
name: upgrades | ||
defaults: | ||
run: | ||
shell: bash | ||
|
||
on: | ||
push: | ||
tags: | ||
- v* | ||
jobs: | ||
ensure-release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Ensure release PASS | ||
uses: lewagon/[email protected] | ||
with: | ||
ref: ${{ github.ref }} | ||
check-name: 'release' | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
wait-interval: 10 | ||
allowed-conclusions: success | ||
test: | ||
runs-on: upgrade-tester | ||
needs: | ||
- ensure-release | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: git fetch --prune --unshallow | ||
- name: set environment | ||
uses: HatsuneMiku3939/direnv-action@v1 | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: "${{ env.GOLANG_VERSION }}" | ||
- name: configure variables | ||
run: | | ||
test_required=$(./script/upgrades.sh test-required ${{ github.ref }}) | ||
echo "TEST_REQUIRED=$test_required" >> $GITHUB_ENV | ||
echo "RELEASE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV | ||
- name: run test | ||
if: env.TEST_REQUIRED == 'true' | ||
run: | | ||
cd tests/upgrade | ||
UPGRADE_BINARY_VERSION=${{ env.RELEASE_TAG }} make 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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: tests | ||
defaults: | ||
run: | ||
shell: bash | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
- mainnet/main | ||
|
||
jobs: | ||
upgrade: | ||
runs-on: upgrade-tester | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: git fetch --prune --unshallow | ||
- name: set environment | ||
uses: HatsuneMiku3939/direnv-action@v1 | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: "${{ env.GOLANG_VERSION }}" | ||
- name: configure variables | ||
run: | | ||
test_required=$(./script/upgrades.sh test-required ${{ github.ref }}) | ||
echo "TEST_REQUIRED=$test_required" >> $GITHUB_ENV | ||
- name: run test | ||
if: env.TEST_REQUIRED == 'true' | ||
run: | | ||
cd tests/upgrade | ||
make test | ||
- name: upload stderr | ||
if: always() && steps."run test".outcome != 'skipped' | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: stderr.log | ||
path: .cache/run/upgrade/stderr.log | ||
- name: upload stdout | ||
if: always() && steps."run test".outcome != 'skipped' | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: stdout.log | ||
path: .cache/run/upgrade/stdout.log |
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.