Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 2 days 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
- Created: 2023-09-04T17:04:38.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-30T02:03:47.000Z (15 days ago)
- Last Synced: 2024-10-30T03:58:17.248Z (15 days ago)
- Topics: era-test-node, testing, zksync, zksync-era
- Language: JavaScript
- Homepage: https://github.com/matter-labs/era-test-node
- Size: 300 KB
- Stars: 7
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Era Test Node Action 🚀
## 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 Actionon:
push:
branches: [ main ]jobs:
build:
runs-on: ubuntu-lateststeps:
- 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 Actionon:
push:
branches: [ main ]jobs:
build:
runs-on: ubuntu-lateststeps:
- 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 Actionon:
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 Actionon:
push:
branches: [ main ]jobs:
build:
runs-on: ubuntu-lateststeps:
- 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.