|
|
|
@ -27,11 +27,23 @@ on: |
|
|
|
|
|
|
|
|
|
env: |
|
|
|
|
MIX_ENV: test |
|
|
|
|
OTP_VERSION: '25.2.1' |
|
|
|
|
ELIXIR_VERSION: '1.14.5' |
|
|
|
|
ACCOUNT_AUTH0_DOMAIN: 'blockscoutcom.us.auth0.com' |
|
|
|
|
OTP_VERSION: "25.2.1" |
|
|
|
|
ELIXIR_VERSION: "1.14.5" |
|
|
|
|
ACCOUNT_AUTH0_DOMAIN: "blockscoutcom.us.auth0.com" |
|
|
|
|
|
|
|
|
|
jobs: |
|
|
|
|
matrix-builder: |
|
|
|
|
name: Build matrix |
|
|
|
|
runs-on: ubuntu-latest |
|
|
|
|
outputs: |
|
|
|
|
matrix: ${{ steps.set-matrix.outputs.matrix }} |
|
|
|
|
steps: |
|
|
|
|
- id: set-matrix |
|
|
|
|
run: | |
|
|
|
|
echo "matrix=$matrixStringifiedObject" >> $GITHUB_OUTPUT |
|
|
|
|
env: |
|
|
|
|
matrixStringifiedObject: '{"chain-type": ["ethereum", "polygon_edge", "polygon_zkevm", "rsk", "suave", "stability"]}' |
|
|
|
|
|
|
|
|
|
build-and-cache: |
|
|
|
|
name: Build and Cache deps |
|
|
|
|
runs-on: ubuntu-latest |
|
|
|
@ -142,10 +154,16 @@ jobs: |
|
|
|
|
${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-" |
|
|
|
|
|
|
|
|
|
- run: mix format --check-formatted |
|
|
|
|
|
|
|
|
|
dialyzer: |
|
|
|
|
strategy: |
|
|
|
|
fail-fast: false |
|
|
|
|
matrix: ${{ fromJson(needs.matrix-builder.outputs.matrix) }} |
|
|
|
|
name: Dialyzer static analysis |
|
|
|
|
runs-on: ubuntu-latest |
|
|
|
|
needs: build-and-cache |
|
|
|
|
needs: |
|
|
|
|
- build-and-cache |
|
|
|
|
- matrix-builder |
|
|
|
|
steps: |
|
|
|
|
- uses: actions/checkout@v4 |
|
|
|
|
- uses: erlef/setup-beam@v1 |
|
|
|
@ -169,18 +187,22 @@ jobs: |
|
|
|
|
id: dialyzer-cache |
|
|
|
|
with: |
|
|
|
|
path: priv/plts |
|
|
|
|
key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-dialyzer-mixlockhash_25-${{ hashFiles('mix.lock') }} |
|
|
|
|
key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-${{ matrix.chain-type }}-dialyzer-mixlockhash_25-${{ hashFiles('mix.lock') }} |
|
|
|
|
restore-keys: | |
|
|
|
|
${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-dialyzer-" |
|
|
|
|
${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-${{ matrix.chain-type }}-dialyzer-" |
|
|
|
|
|
|
|
|
|
- name: Conditionally build Dialyzer Cache |
|
|
|
|
if: steps.dialyzer-cache.output.cache-hit != 'true' |
|
|
|
|
run: | |
|
|
|
|
mkdir -p priv/plts |
|
|
|
|
mix dialyzer --plt |
|
|
|
|
env: |
|
|
|
|
CHAIN_TYPE: ${{ matrix.chain-type }} |
|
|
|
|
|
|
|
|
|
- name: Run Dialyzer |
|
|
|
|
run: mix dialyzer --halt-exit-status |
|
|
|
|
env: |
|
|
|
|
CHAIN_TYPE: ${{ matrix.chain-type }} |
|
|
|
|
|
|
|
|
|
gettext: |
|
|
|
|
name: Missing translation keys check |
|
|
|
@ -370,9 +392,14 @@ jobs: |
|
|
|
|
working-directory: apps/block_scout_web/assets |
|
|
|
|
|
|
|
|
|
test_nethermind_mox_ethereum_jsonrpc: |
|
|
|
|
strategy: |
|
|
|
|
fail-fast: false |
|
|
|
|
matrix: ${{ fromJson(needs.matrix-builder.outputs.matrix) }} |
|
|
|
|
name: EthereumJSONRPC Tests |
|
|
|
|
runs-on: ubuntu-latest |
|
|
|
|
needs: build-and-cache |
|
|
|
|
needs: |
|
|
|
|
- build-and-cache |
|
|
|
|
- matrix-builder |
|
|
|
|
services: |
|
|
|
|
postgres: |
|
|
|
|
image: postgres |
|
|
|
@ -423,10 +450,16 @@ jobs: |
|
|
|
|
PGUSER: postgres |
|
|
|
|
ETHEREUM_JSONRPC_CASE: "EthereumJSONRPC.Case.Nethermind.Mox" |
|
|
|
|
ETHEREUM_JSONRPC_WEB_SOCKET_CASE: "EthereumJSONRPC.WebSocket.Case.Mox" |
|
|
|
|
CHAIN_TYPE: "${{ matrix.chain-type }}" |
|
|
|
|
test_nethermind_mox_explorer: |
|
|
|
|
strategy: |
|
|
|
|
fail-fast: false |
|
|
|
|
matrix: ${{ fromJson(needs.matrix-builder.outputs.matrix) }} |
|
|
|
|
name: Explorer Tests |
|
|
|
|
runs-on: ubuntu-latest |
|
|
|
|
needs: build-and-cache |
|
|
|
|
needs: |
|
|
|
|
- build-and-cache |
|
|
|
|
- matrix-builder |
|
|
|
|
services: |
|
|
|
|
postgres: |
|
|
|
|
image: postgres |
|
|
|
@ -488,10 +521,16 @@ jobs: |
|
|
|
|
PGUSER: postgres |
|
|
|
|
ETHEREUM_JSONRPC_CASE: "EthereumJSONRPC.Case.Nethermind.Mox" |
|
|
|
|
ETHEREUM_JSONRPC_WEB_SOCKET_CASE: "EthereumJSONRPC.WebSocket.Case.Mox" |
|
|
|
|
CHAIN_TYPE: "${{ matrix.chain-type }}" |
|
|
|
|
test_nethermind_mox_indexer: |
|
|
|
|
strategy: |
|
|
|
|
fail-fast: false |
|
|
|
|
matrix: ${{ fromJson(needs.matrix-builder.outputs.matrix) }} |
|
|
|
|
name: Indexer Tests |
|
|
|
|
runs-on: ubuntu-latest |
|
|
|
|
needs: build-and-cache |
|
|
|
|
needs: |
|
|
|
|
- build-and-cache |
|
|
|
|
- matrix-builder |
|
|
|
|
services: |
|
|
|
|
postgres: |
|
|
|
|
image: postgres |
|
|
|
@ -529,7 +568,6 @@ jobs: |
|
|
|
|
restore-keys: | |
|
|
|
|
${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- run: ./bin/install_chrome_headless.sh |
|
|
|
|
|
|
|
|
|
- name: mix test --exclude no_nethermind |
|
|
|
@ -546,15 +584,20 @@ jobs: |
|
|
|
|
PGUSER: postgres |
|
|
|
|
ETHEREUM_JSONRPC_CASE: "EthereumJSONRPC.Case.Nethermind.Mox" |
|
|
|
|
ETHEREUM_JSONRPC_WEB_SOCKET_CASE: "EthereumJSONRPC.WebSocket.Case.Mox" |
|
|
|
|
|
|
|
|
|
CHAIN_TYPE: "${{ matrix.chain-type }}" |
|
|
|
|
test_nethermind_mox_block_scout_web: |
|
|
|
|
strategy: |
|
|
|
|
fail-fast: false |
|
|
|
|
matrix: ${{ fromJson(needs.matrix-builder.outputs.matrix) }} |
|
|
|
|
name: Blockscout Web Tests |
|
|
|
|
runs-on: ubuntu-latest |
|
|
|
|
needs: build-and-cache |
|
|
|
|
needs: |
|
|
|
|
- build-and-cache |
|
|
|
|
- matrix-builder |
|
|
|
|
services: |
|
|
|
|
redis_db: |
|
|
|
|
image: 'redis:alpine' |
|
|
|
|
ports: |
|
|
|
|
image: "redis:alpine" |
|
|
|
|
ports: |
|
|
|
|
- 6379:6379 |
|
|
|
|
|
|
|
|
|
postgres: |
|
|
|
@ -593,7 +636,6 @@ jobs: |
|
|
|
|
restore-keys: | |
|
|
|
|
${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Restore Explorer NPM Cache |
|
|
|
|
uses: actions/cache@v2 |
|
|
|
|
id: explorer-npm-cache |
|
|
|
@ -638,3 +680,4 @@ jobs: |
|
|
|
|
ACCOUNT_ENABLED: "true" |
|
|
|
|
ACCOUNT_REDIS_URL: "redis://localhost:6379" |
|
|
|
|
SOURCIFY_INTEGRATION_ENABLED: "true" |
|
|
|
|
CHAIN_TYPE: "${{ matrix.chain-type }}" |
|
|
|
|