erigon-test-unit

Runs Erigon unit tests locally with make test-short for pre-push verification.

3.6k|1.5k|Updated May 27, 2019
One-click install
npx skills add https://github.com/erigontech/erigon --skill erigon-test-unit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: erigon-test-unit
Source: https://github.com/erigontech/erigon/tree/main/.claude/skills/erigon-test-unit
Command: npx skills add https://github.com/erigontech/erigon --skill erigon-test-unit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Developers working on the Erigon Ethereum client need a fast way to verify their changes do not break existing functionality before pushing code, without waiting for remote CI pipelines to run.

Core Features & Use Cases

  • Full Unit Test Suite: Runs the complete unit test suite with -short -failfast flags via make test-short, catching most regressions in about 5 minutes.
  • Targeted Package Testing: Supports running tests for specific packages or individual test functions using standard go test commands.
  • CI Parity: The local command is equivalent to the "Unit tests" GitHub Actions workflow in ci.yml, so local results predict CI outcomes.
  • Use Case: After fixing a bug in the staged sync module, run the suite locally to confirm no regressions before pushing your branch and opening a pull request.

Quick Start

Run the Erigon unit test suite locally with make test-short from the repository root to verify my changes before pushing.

Frequently Asked Questions about erigon-test-unit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run Erigon unit tests locally?

Run `make test-short` from the Erigon repository root where the Makefile lives. This executes the full unit test suite with `-short -failfast` flags and catches most regressions in about 5 minutes.

How to run tests for a single Go package in Erigon?

Use `go test -short ./execution/stagedsync/...` for a specific package tree, or `go test -short -run TestName ./path/to/package/...` to run an individual test function within a package.

Does make test-short match the Erigon CI unit test workflow?

Yes, `make test-short` is equivalent to the "Unit tests" GitHub Actions workflow defined in ci.yml, which triggers on pushes and pull requests to main. Local results should predict CI outcomes.

Why does make test-short fail with a Makefile error?

The command must be run from the repository root directory where the Makefile is located. Navigate to the Erigon root with `cd /path/to/erigon` before running the command.

Can I trigger the Erigon unit test CI workflow on a branch without a PR?

Yes, use `gh workflow run "Unit tests" --ref <branch>` to dispatch the workflow remotely on any branch without opening a pull request.