Skip to content

feat(str): STRV2 bookkeeping #4071

feat(str): STRV2 bookkeeping

feat(str): STRV2 bookkeeping #4071

Workflow file for this run

name: E2E Test
on:
pull_request:
branches:
- main
- release/**
push:
branches:
- release/**
permissions: read-all
jobs:
test-e2e:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v5
with:
go-version: '1.22'
check-latest: true
- uses: actions/checkout@v4
- uses: technote-space/get-diff-action@v6.1.2
with:
PATTERNS: |
go.mod
go.sum
**/*.go
*.toml
tests/e2e/*
Dockerfile
.github/workflows/e2e-test*
- name: Test E2E
run: |
make test-e2e
if: env.GIT_DIFF
test-files-matrix:
runs-on: ubuntu-latest
outputs:
test_matrix: ${{ steps.set_matrix.outputs.test_matrix }}
steps:
- uses: actions/checkout@v4
- name: Set up test file matrix to run nix tests in parallel
id: set_matrix
run: |
cd ./tests/nix_tests || exit 1
# Define parallel test files
PARALLEL_TESTS=(
"test_account.py"
"test_filters.py"
"test_fee_history.py"
"test_grpc_only.py"
"test_ibc.py"
"test_no_abci_resp.py"
"test_osmosis_outpost.py"
"test_precompiles.py"
"test_priority.py"
"test_pruned_node.py"
"test_rollback.py"
"test_stride_outpost.py"
"test_storage_proof.py"
"test_zero_fee.py"
)
# Get all test files
# shellcheck disable=SC2207
ALL_FILES=($(ls test_*.py))
# Determine remaining test files
# (the test files that will run all together in one process)
REMAINING_FILES=()
for file in "${ALL_FILES[@]}"; do
if [[ ! " ${PARALLEL_TESTS[*]} " =~ $file ]]; then
REMAINING_FILES+=("$file")
fi
done
# Construct test matrix
# shellcheck disable=SC2076,SC2124,SC2048,SC2086,SC2089,SC2027
TEST_FILES="[$(printf '"%s",' ${PARALLEL_TESTS[*]}) \"${REMAINING_FILES[*]}\"]"
echo "test_matrix=${TEST_FILES}" >> "$GITHUB_OUTPUT"
echo "Test matrix: ${TEST_FILES}"
test-nix:
needs: test-files-matrix
permissions:
contents: write
runs-on: ubuntu-latest
strategy:
matrix:
test_files: ${{fromJson(needs.test-files-matrix.outputs.test_matrix)}}
steps:
- name: Determine token
id: token_check
run: |
if [ -n "${{ secrets.E2E_PAT }}" ]; then
TOKEN=${{ secrets.E2E_PAT }}
else
TOKEN=${{ secrets.GITHUB_TOKEN }}
fi
echo "token=${TOKEN}" >> "$GITHUB_OUTPUT"
- uses: actions/checkout@v4
with:
token: ${{ steps.token_check.outputs.token }}
- name: Install Nix
uses: cachix/install-nix-action@v26
with:
install_url: https://releases.nixos.org/nix/nix-2.13.3/install
nix_path: nixpkgs=channel:nixos-22.11
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- name: Setup Cachix
uses: cachix/cachix-action@v14
with:
name: evmosd
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- uses: technote-space/get-diff-action@v6.1.2
with:
PATTERNS: |
**/**.sol
**/**.go
go.mod
go.sum
*.toml
tests/nix_tests/**
.github/workflows/e2e-test*
- name: Run nix tests
env:
ARGS: "${{ matrix.test_files }}"
run: make run-nix-tests
if: env.GIT_DIFF
# Commit gomod2nix changes files back to the repository if necessary
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: update gomod2nix.toml file
file_pattern: '*.toml'