https://github.com/dutterbutter/era-test-node-action
GitHub Action for quick CI/CD usage with era_test_node
https://github.com/dutterbutter/era-test-node-action
era-test-node testing zksync zksync-era
Last synced: 12 months ago
JSON representation
GitHub Action for quick CI/CD usage with era_test_node
- Host: GitHub
- URL: https://github.com/dutterbutter/era-test-node-action
- Owner: dutterbutter
- License: apache-2.0
- Archived: true
- Created: 2023-09-04T17:04:38.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-12-06T13:36:23.000Z (over 1 year ago)
- Last Synced: 2025-03-23T11:03:52.365Z (about 1 year ago)
- Topics: era-test-node, testing, zksync, zksync-era
- Language: JavaScript
- Homepage: https://github.com/matter-labs/era-test-node
- Size: 527 KB
- Stars: 7
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Era Test Node Action 🚀
### ⚠️ Warning
This action has been **archived** in favor of [`anvil-zksync-action`](https://github.com/dutterbutter/anvil-zksync-action).
By default, this action fetches version `v0.1.0-alpha.36` of `era-test-node` unless a different tag is specified, as this was the last release before the binary was renamed. Tags past this may not work given the binary difference.
## Description
This GitHub Action runs the [`era_test_node`](https://github.com/matter-labs/era-test-node) with various options. It allows for high configurability and makes it easy to integrate `era_test_node` into your CI/CD workflows on GitHub Actions.
**Test node repo**: [matter-labs/era-test-node](https://github.com/matter-labs/era-test-node).
## Features 🌟
- Supports multiple modes: `run` and `fork`.
- Allows you to specify which network to use (e.g., `mainnet`, `testnet`).
- Optional fork at a specific block height.
- Show calls, storage logs, VM details, and gas details based on specified options.
- Enable hash resolution.
- Configurable logging options.
- Support for different target architectures.
- Ability to specify the release tag of `era_test_node`.
## Inputs 🛠
### `mode`
Mode to run era_test_node in (`run`, `fork`).
- **Required**: No
- **Default**: `run`
### `network`
The network to use (e.g., `mainnet`, `testnet`) and **should only be used** alongside `fork`.
- **Required**: No
### `forkAtHeight`
The block height to fork at. Needs to be used alongside `fork`.
- **Required**: No
### `port`
Port to listen on.
- **Required**: No
- **Default**: `8011`
### `showCalls`
Show call debug information.
- **Required**: No
- **Default**: `none`
- **Options**: `none`, `user`, `system`, `all`
### `showStorageLogs`
Show storage log information.
- **Required**: No
- **Default**: `none`
- **Options**: `none`, `read`, `write`, `all`
### `showVmDetails`
Show VM details information.
- **Required**: No
- **Default**: `none`
- **Options**: `none`, `all`
### `showGasDetails`
Show Gas details information.
- **Required**: No
- **Default**: `none`
- **Options**: `none`, `all`
### `resolveHashes`
Enable hash resolution.
- **Required**: No
- **Default**: `false`
### `log`
Log filter level.
- **Required**: No
- **Default**: `info`
- **Options**: `debug`, `info`, `warn`, `error`
### `logFilePath`
Log file path.
- **Required**: No
- **Default**: `era_test_node.log`
### `target`
Target architecture.
- **Required**: No
- **Default**: `x86_64-unknown-linux-gnu`
- **Options**: `x86_64-unknown-linux-gnu`, `x86_64-apple-darwin`, `aarch64-apple-darwin`
### `releaseTag`
Release tag of `era_test_node` to use.
- **Required**: No
- **Default**: `latest`
## Example Usage 📝
### Quickstart
```yml
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
```
### Command options
```yml
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'
releaseTag: 'latest'
```
### Upload log file to artifacts
```yml
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
```yml
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'
```
## Contributing 🤝
Feel free to open issues or PRs if you find any problems or have suggestions for improvements. Your contributions are more than welcome!
## License 📄
This project is licensed under the Apache 2.0 License - see the [LICENSE.md](LICENSE.md) file for details.