36cbb52004
Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 15 to 17. - [Release notes](https://github.com/cachix/install-nix-action/releases) - [Commits](https://github.com/cachix/install-nix-action/compare/v15...v17) --- updated-dependencies: - dependency-name: cachix/install-nix-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
205 lines
5.0 KiB
YAML
205 lines
5.0 KiB
YAML
name: Tests
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- main
|
|
- 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'"
|
|
|
|
test-unit-cover:
|
|
runs-on: ubuntu-latest
|
|
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.0
|
|
with:
|
|
PATTERNS: |
|
|
**/**.go
|
|
go.mod
|
|
go.sum
|
|
- name: Test and Create Coverage Report
|
|
run: |
|
|
make test-unit-cover
|
|
if: env.GIT_DIFF
|
|
- uses: codecov/codecov-action@v3
|
|
with:
|
|
file: ./coverage.txt
|
|
fail_ci_if_error: true
|
|
if: env.GIT_DIFF
|
|
|
|
test-importer:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
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.0
|
|
id: git_diff
|
|
with:
|
|
PATTERNS: |
|
|
**/**.go
|
|
go.mod
|
|
go.sum
|
|
- name: test-importer
|
|
run: |
|
|
make test-import
|
|
if: env.GIT_DIFF
|
|
|
|
test-rpc:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
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.0
|
|
with:
|
|
PATTERNS: |
|
|
**/**.sol
|
|
**/**.go
|
|
go.mod
|
|
go.sum
|
|
- name: Test rpc endpoint
|
|
run: |
|
|
make test-rpc
|
|
if: env.GIT_DIFF
|
|
|
|
test-e2e:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
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.0
|
|
with:
|
|
PATTERNS: |
|
|
**/**.sol
|
|
**/**.go
|
|
go.mod
|
|
go.sum
|
|
- name: Test e2e
|
|
run: |
|
|
make test-integration
|
|
if: env.GIT_DIFF
|
|
|
|
integration_tests:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: cachix/install-nix-action@v17
|
|
- uses: cachix/cachix-action@v10
|
|
with:
|
|
name: ethermint
|
|
signingKey: "${{ secrets.CACHIX_SIGNING_KEY }}"
|
|
- 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
|
|
|
|
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.0
|
|
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.0
|
|
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.0
|
|
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.0
|
|
with:
|
|
PATTERNS: |
|
|
**/**.go
|
|
go.mod
|
|
go.sum
|
|
- name: Test simulation after import
|
|
run: |
|
|
make test-sim-after-import
|
|
if: env.GIT_DIFF |