Validium Docs
  • Overview
  • Connect to Validium
  • Start Coding 🚀
    • Quickstart
      • Overview
      • Deploy using Validium CLI
      • Deploy using Quickstart Repository
      • Deploy your first contract
      • Create an ERC20 token
  • Tooling
    • Block Explorers
    • Hardhat-Validium
      • Overview
      • Installation
      • Guides
        • Getting started
        • Migrating Hardhat project to Validium
        • Compiling non-inlinable libraries
      • Plugins
        • hardhat-zksync
        • hardhat-zksync-solc
        • hardhat-zksync-vyper
        • hardhat-zksync-deploy
        • hardhat-zksync-upgradable
        • hardhat-zksync-verify
        • hardhat-zksync-verify-vyper
        • hardhat-zksync-ethers
        • hardhat-zksync-node
        • Hardhat Community Plugins
    • Foundary
      • Overview
      • Installation
      • Getting Started
      • Migration Guide
        • Overview
        • Compilation
        • Deployment
        • Testing
  • Test and Debug
    • Getting Started
    • Docker L1 - L2 Nodes
    • In-Memory Node
    • Continuous Integration
    • Hardhat
    • Foundry
  • API Reference
    • Overview
    • Conventions
    • ZKs JSON-RPC API
    • Debug JSON-RPC API
    • Ethereum JSON-RPC API
    • PubSub JSON-RPC API
  • Concepts
    • Transaction Lifecycle
    • Blocks and Batches
    • Validium Network Fee Mechanism
    • Finality
    • System Upgrades
    • ZK Chains
    • Data Availability
      • Overview
      • Recreating L2 state from L1 pubdata
      • Validiums
    • Account Abstraction
    • L1 <-> L2 Communication
  • Components
    • Overview
    • Smart & System Contracts
      • Smart Contracts
      • System Contracts
    • Shared Bridges
    • Sequencer / Server
    • Validium Network EVM
      • Overview
      • Bootloader
      • Precompiles
      • Virtual Machine Specification
        • ZKsync Virtual Machine primer
        • VM Formal Specification
    • Prover
      • Overview
      • ZK Terminology
      • Running the Prover
      • Circuits
        • Overview
        • Circuit Testing
        • CodeDecommitter
        • DemuxLogQueue
        • ECRecover
        • KeccakRoundFunction
        • L1MessagesHasher
        • LogSorter
        • Main VM
        • RAMPermutation
        • Sha256RoundFunction
        • StorageApplication
        • Sorting and Deduplicating
          • Overview
          • SortDecommitments
          • StorageSorter
          • LogSorter
      • Boojum Gadgets
      • Boojum Function - `check_if_satisfied`
    • Compiler
      • Compiler Toolchain Overview
        • Compiler Toolchain Overview
        • Solidity Compiler
        • Vyper Compiler
        • LLVM Framework
      • Specification
        • Overview
        • Code Separation
        • System Contracts
        • Exception Handling
        • EVM Legacy Assembly Translator
        • Instructions
          • Instruction Reference
          • EVM
            • Native EVM Instructions
            • Arithmetic
            • Bitwise
            • Block
            • Call
            • Create
            • Environment
            • Logging
            • Logical
            • Memory
            • Return
            • Sha3
            • Stack
          • Extensions
            • Overview
            • Validium Network Extension Simulation (call)
            • Validium Network Extension Simulation (verbatim)
          • EVM Legacy Assembly
          • Yul
        • EraVM Binary Layout
    • Fee Withdrawer
    • Portal - Wallet + Bridge
    • Block Explorer
    • Transaction filtering
Powered by GitBook
On this page
  • Configuration Options
  • Examples
  1. Test and Debug

Continuous Integration

Use a GitHub Action to integrate era-test-node into your CI/CD environment.

PreviousIn-Memory NodeNextHardhat

Last updated 7 months ago


A GitHub Action is available for integrating era-test-node into your CI/CD environments. This action offers high configurability and streamlines the process of testing your applications in an automated way.

You can find the GitHub Action available in the .

In CI tests, use 127.0.0.1 as the URL in hardhat.config.ts or for the provider to avoid 'Cannot connect to network' errors.

Configuration Options

Option
Description
Required
Default
Options

mode

Operation mode.

No

run

run, fork

network

Network selection.

No

-

-

forkAtHeight

Block height to fork at.

No

-

-

port

Listening port.

No

8011

-

showCalls

Call debug visibility.

No

none

none, user, system, all

showStorageLogs

Storage log visibility.

No

none

none, read, write, all

showVmDetails

VM details visibility.

No

none

none, all

showGasDetails

Gas details visibility.

No

none

none, all

resolveHashes

Enable hash resolution.

No

false

-

log

Log filter level.

No

info

debug, info, warn, error

logFilePath

Path for the log file.

No

era_test_node.log

-

target

Target architecture.

No

x86_64-unknown-linux-gnu

x86_64-unknown-linux-gnu, x86_64-apple-darwin, aarch64-apple-darwin

version

Version of era_test_node.

No

latest

-


Examples

The following are examples of configuration for your GitHub Action.

Quickstart

name: Run Era Test Node Action

on:
  push:
    branches: [main]

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout code
        uses: actions/checkout@v3

      - name: Run Era Test Node
        uses: dutterbutter/era-test-node-action@latest

Advanced

With configuration options:

name: Run Era Test Node Action

on:
  push:
    branches: [main]

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout code
        uses: actions/checkout@v3

      - name: Run Era Test Node
        uses: dutterbutter/era-test-node-action@latest
        with:
          mode: "run"
          showCalls: "user"
          showStorageLogs: "read"
          showVmDetails: "all"
          showGasDetails: "all"
          resolveHashes: "true"
          log: "info"
          logFilePath: "era_test_node.log"
          target: "x86_64-unknown-linux-gnu"

With upload log file to artifacts:

name: Run Era Test Node Action

on:
  pull_request:
    branches: [main]
  workflow_dispatch:
jobs:
  test:
    name: unit-tests
    strategy:
      matrix:
        platform: [ubuntu-latest]
    runs-on: ${{ matrix.platform }}

    steps:
      - name: Checkout Code
        uses: actions/checkout@v3

      - name: Run Era Test Node
        uses: dutterbutter/era-test-node-action@latest
        with:
          mode: "fork"
          network: "mainnet"
          forkAtHeight: "1855248"
          showCalls: "user"
          showStorageLogs: "read"
          showVmDetails: "all"
          showGasDetails: "all"
          resolveHashes: "true"
          log: "info"
          logFilePath: "era_test_node.log"
          target: "x86_64-unknown-linux-gnu"
          releaseTag: "latest"

      - name: Install Dependencies
        run: yarn install

      - name: Run Tests
        run: |
          yarn test:contracts

      - name: Upload era_test_node log
        uses: actions/upload-artifact@v3
        with:
          name: era_test_node-log
          path: era_test_node.log

With Fork:

name: Run Era Test Node Action

on:
  push:
    branches: [main]

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout code
        uses: actions/checkout@v3

      - name: Run Era Test Node
        uses: dutterbutter/era-test-node-action@latest
        with:
          mode: "fork"
          network: "mainnet"
          forkAtHeight: "1855248"
          showCalls: "user"
          showStorageLogs: "read"
          showVmDetails: "all"
          showGasDetails: "all"
          resolveHashes: "true"
          log: "info"
          logFilePath: "era_test_node.log"
          target: "x86_64-unknown-linux-gnu"
          releaseTag: "latest"
marketplace