Skip to content

Kanas/refractored storage derive macro #26412

Kanas/refractored storage derive macro

Kanas/refractored storage derive macro #26412

Workflow file for this run

name: EVM test suite
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
merge_group:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
isdraft:
uses: ./.github/workflows/reusable-isdraft.yml
preflight:
needs: isdraft
uses: ./.github/workflows/reusable-preflight.yml
differential-tests:
needs: [preflight]
runs-on: ${{ needs.preflight.outputs.RUNNER }}
if: ${{ needs.preflight.outputs.changes_rust }}
timeout-minutes: 60
container:
image: ${{ needs.preflight.outputs.IMAGE }}
permissions:
pull-requests: write
strategy:
fail-fast: false
matrix:
platform:
["revive-dev-node-revm-solc", "revive-dev-node-polkavm-resolc"]
steps:
- name: Checkout the Polkadot SDK
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Update the Installed Python
run: apt-get update && apt-get install -y python3-pip python3
- name: Install resolc
id: download
uses: ./.github/actions/get-resolc
- name: Run revive differential tests
uses: paritytech/revive-differential-tests/.github/actions/run-differential-tests@004a36f4e88228ee1331cb598c8873ab7315e3f0
with:
platform: ${{ matrix.platform }}
cargo-command: "forklift cargo"
revive-differential-tests-ref: "004a36f4e88228ee1331cb598c8873ab7315e3f0"
resolc-path: ${{ steps.download.outputs.resolc-path }}
expectations-file-path: ./.github/assets/${{ matrix.platform }}.json
evm-test-suite:
needs: [preflight]
runs-on: ${{ needs.preflight.outputs.RUNNER }}
if: ${{ needs.preflight.outputs.changes_rust }}
timeout-minutes: 60
container:
image: ${{ needs.preflight.outputs.IMAGE }}
env:
# Enable debug assertions since we are running optimized builds for testing
# but still want to have debug assertions.
RUSTFLAGS: "-C debug-assertions"
RUST_BACKTRACE: 1
strategy:
matrix:
platform: ["test:pvm", "test:evm"]
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: script
run: |
forklift cargo build --locked --release -p pallet-revive-eth-rpc --bin eth-rpc
forklift cargo build --locked --release -p revive-dev-node --bin revive-dev-node
- name: Checkout evm-tests
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
repository: paritytech/evm-test-suite
ref: 369d53dd76c8e2c7a30d7eefef03fa1728186c8a
path: evm-test-suite
- uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- name: script
run: |
echo "Change to the evm-test-suite directory"
cd evm-test-suite
deno --version
echo "Check that binaries are in place"
export REVIVE_DEV_NODE_PATH=$(readlink -f ../target/release/revive-dev-node)
export ETH_RPC_PATH=$(readlink -f ../target/release/eth-rpc)
echo $REVIVE_DEV_NODE_PATH $ETH_RPC_PATH
echo "== Running tests =="
START_REVIVE_DEV_NODE=true START_ETH_RPC=true deno task ${{ matrix.platform }}
confirm-required-test-evm-jobs-passed:
runs-on: ubuntu-latest
name: All test misc tests passed
# If any new job gets added, be sure to add it to this array
needs:
- evm-test-suite
if: always() && !cancelled()
steps:
- run: |
tee resultfile <<< '${{ toJSON(needs) }}'
FAILURES=$(cat resultfile | grep -E '"result": "(failure|cancelled)"' | wc -l)
if [ $FAILURES -gt 0 ]; then
echo "### At least one required job failed ❌" >> $GITHUB_STEP_SUMMARY
exit 1
else
echo '### Good job! All the required jobs passed 🚀' >> $GITHUB_STEP_SUMMARY
fi