Merge pull request #42 from cerc-io/murali/update-workflows

update workflows from ethermint
This commit is contained in:
Murali Krishna Komatireddy 2022-10-24 23:03:55 +05:30 committed by GitHub
commit 9f31e1b556
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,33 +15,17 @@ jobs:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
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:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v2.1.4
- uses: actions/setup-go@v3
with:
go-version: 1.18
check-latest: true
- uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v6.0.1
- uses: technote-space/get-diff-action@v6.1.1
with:
PATTERNS: |
**/**.sol
**/**.go
go.mod
go.sum
@ -49,7 +33,7 @@ jobs:
run: |
make test-unit-cover
if: env.GIT_DIFF
- uses: codecov/codecov-action@v2.1.0
- uses: codecov/codecov-action@v3
with:
file: ./coverage.txt
fail_ci_if_error: true
@ -59,87 +43,33 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/setup-go@v2.1.4
- uses: actions/setup-go@v3
with:
go-version: 1.18
check-latest: true
- 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
with:
SUFFIX_FILTER: |
.go
.mod
.sum
PATTERNS: |
**/**.go
go.mod
go.sum
- name: test-importer
run: |
make test-import
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:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/setup-go@v2.1.4
- uses: actions/setup-go@v3
with:
go-version: 1.18
check-latest: true
- uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v6.0.1
- uses: technote-space/get-diff-action@v6.1.1
with:
PATTERNS: |
**/**.sol
@ -155,11 +85,12 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/setup-go@v2.1.4
- uses: actions/setup-go@v3
with:
go-version: 1.18
check-latest: true
- uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v6.0.1
- uses: technote-space/get-diff-action@v6.1.1
with:
PATTERNS: |
**/**.sol
@ -170,3 +101,130 @@ jobs:
run: |
make test-integration
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