update workflows from ethermint #42

Merged
0xmuralik merged 1 commits from murali/update-workflows into main 2022-10-24 17:33:55 +00:00

View File

@ -15,33 +15,17 @@ jobs:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main'" if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main'"
install-tparse:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v2.1.4
with:
go-version: 1.18
- name: Display Go Version
run: go version
- name: Install tparse
run: |
export GO111MODULE="on" && go install github.com/mfridman/tparse@latest
- uses: actions/cache@v3
with:
path: ~/go/bin
key: ${{ runner.os }}-go-tparse-binary
test-unit-cover: test-unit-cover:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/setup-go@v2.1.4 - uses: actions/setup-go@v3
with: with:
go-version: 1.18 go-version: 1.18
check-latest: true
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v6.0.1 - uses: technote-space/get-diff-action@v6.1.1
with: with:
PATTERNS: | PATTERNS: |
**/**.sol
**/**.go **/**.go
go.mod go.mod
go.sum go.sum
@ -49,7 +33,7 @@ jobs:
run: | run: |
make test-unit-cover make test-unit-cover
if: env.GIT_DIFF if: env.GIT_DIFF
- uses: codecov/codecov-action@v2.1.0 - uses: codecov/codecov-action@v3
with: with:
file: ./coverage.txt file: ./coverage.txt
fail_ci_if_error: true fail_ci_if_error: true
@ -59,87 +43,33 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 10 timeout-minutes: 10
steps: steps:
- uses: actions/setup-go@v2.1.4 - uses: actions/setup-go@v3
with: with:
go-version: 1.18 go-version: 1.18
check-latest: true
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v6.0.1 - uses: technote-space/get-diff-action@v6.1.1
id: git_diff id: git_diff
with: with:
SUFFIX_FILTER: | PATTERNS: |
.go **/**.go
.mod go.mod
.sum go.sum
- name: test-importer - name: test-importer
run: | run: |
make test-import make test-import
if: env.GIT_DIFF if: env.GIT_DIFF
test-solidity:
runs-on: ubuntu-latest
timeout-minutes: 240
strategy:
fail-fast: false
matrix:
batch: ['1-3', '2-3', '3-3']
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v2
with:
go-version: 1.18
- uses: technote-space/get-diff-action@v6.0.1
id: git_diff
with:
PATTERNS: |
**/**.sol
**/**.go
tests/solidity/**/*.js
tests/solidity/**/*.sh
go.mod
go.sum
- name: test-solidity
run: |
./scripts/run-solidity-tests.sh --batch=${{ matrix.batch }}
if: env.GIT_DIFF
liveness-test:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v2.1.4
with:
go-version: 1.18
- uses: technote-space/get-diff-action@v6.0.1
id: git_diff
with:
PATTERNS: |
**/**.go
go.mod
go.sum
- name: Install Starport
run: |
curl https://get.starport.network/starport! | bash
if: env.GIT_DIFF
- name: Start Local Network via Starport
run: |
starport chain serve --reset-once -v -c ./starport.yml > starport.out 2>&1 &
if: env.GIT_DIFF
- name: Test Local Network Liveness
run: |
sleep 2m
./contrib/scripts/test_localnet_liveness.sh 100 5 50 localhost
if: env.GIT_DIFF
test-rpc: test-rpc:
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 15 timeout-minutes: 15
steps: steps:
- uses: actions/setup-go@v2.1.4 - uses: actions/setup-go@v3
with: with:
go-version: 1.18 go-version: 1.18
check-latest: true
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v6.0.1 - uses: technote-space/get-diff-action@v6.1.1
with: with:
PATTERNS: | PATTERNS: |
**/**.sol **/**.sol
@ -155,11 +85,12 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 15 timeout-minutes: 15
steps: steps:
- uses: actions/setup-go@v2.1.4 - uses: actions/setup-go@v3
with: with:
go-version: 1.18 go-version: 1.18
check-latest: true
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v6.0.1 - uses: technote-space/get-diff-action@v6.1.1
with: with:
PATTERNS: | PATTERNS: |
**/**.sol **/**.sol
@ -170,3 +101,130 @@ jobs:
run: | run: |
make test-integration make test-integration
if: env.GIT_DIFF if: env.GIT_DIFF
integration_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: cachix/install-nix-action@v18
- uses: cachix/cachix-action@v11
with:
name: ethermint
signingKey: "${{ secrets.CACHIX_SIGNING_KEY }}"
- uses: technote-space/get-diff-action@v6.1.1
with:
PATTERNS: |
**/**.sol
**/**.go
go.mod
go.sum
tests/integration_tests/**
- name: Run integration tests
run: make run-integration-tests
if: env.GIT_DIFF
- name: 'Tar debug files'
if: failure()
run: tar cfz debug_files.tar.gz -C /tmp/pytest-of-runner .
- uses: actions/upload-artifact@v3
if: failure()
with:
name: debug-files
path: debug_files.tar.gz
if-no-files-found: ignore
upload-cache:
if: github.event_name == 'push'
needs: ["integration_tests"]
strategy:
matrix:
os: [macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: cachix/install-nix-action@v18
- uses: cachix/cachix-action@v11
with:
name: ethermint
signingKey: "${{ secrets.CACHIX_SIGNING_KEY }}"
- name: 'instantiate integration test env'
run: nix-store -r $(nix-instantiate tests/integration_tests/shell.nix)
test-sim-nondeterminism:
runs-on: ubuntu-latest
timeout-minutes: 25
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.18
check-latest: true
- uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v6.1.1
with:
PATTERNS: |
**/**.go
go.mod
go.sum
- name: Test simulation nondeterminism
run: |
make test-sim-nondeterminism
if: env.GIT_DIFF
test-sim-random-genesis-fast:
runs-on: ubuntu-latest
timeout-minutes: 25
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.18
check-latest: true
- uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v6.1.1
with:
PATTERNS: |
**/**.go
go.mod
go.sum
- name: Test simulation with random genesis
run: |
make test-sim-random-genesis-fast
if: env.GIT_DIFF
test-sim-import-export:
runs-on: ubuntu-latest
timeout-minutes: 25
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.18
check-latest: true
- uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v6.1.1
with:
PATTERNS: |
**/**.go
go.mod
go.sum
- name: Simulation of import and export genesis
run: |
make test-sim-import-export
if: env.GIT_DIFF
test-sim-after-import:
runs-on: ubuntu-latest
timeout-minutes: 25
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.18
check-latest: true
- uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v6.1.1
with:
PATTERNS: |
**/**.go
go.mod
go.sum
- name: Test simulation after import
run: |
make test-sim-after-import
if: env.GIT_DIFF