ci: run Hardhat unit tests in GitHub Actions - #370
Conversation
|
I filed #369, so I re-ran my reproduction against this patch. It is correct, and it matches the repo's existing CI conventions exactly. Notes below, including one subtlety I got wrong in my own first draft of the issue that is worth recording so it doesn't get "optimized" away later. The Foundry step is load-bearing — please don't drop itThe non-obvious part of this patch is installing Foundry for a job that never compiles a contract. My initial draft of #369 proposed a Node-only job and asserted no Foundry was needed. That was wrong, and stripping
Worth a one-line comment in the workflow saying why Foundry is there, since a future reader will reasonably assume a TypeScript unit job doesn't need it. Skipping submodule init is correctThe PR description calls this out and it holds up: I ran the suite with all three Convention checks
Expected resultWhen it runs, maintainers should see 37 passing across 4 files — Two things this patch cannot fix
Non-blocking: the glob can silently exclude new tests
For the record, Disclosure: I am external to Circle — an unaffiliated community contributor with no write access to this repository. This is advisory review only, not an approval, and the measurements above are from my own local runs and should be confirmed by CI. |
Summary
add a dedicated TypeScript Unit Tests CI job
install Node 22 and the repo-pinned Foundry version
run the existing make test-unit-hardhat target
intentionally skip contract submodule initialization and compilation because this unit suite does not require them
This ensures the existing Hardhat unit suite is exercised on pull requests instead of remaining outside CI.
Fixes #369