Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add test-all-solc-versions input to the core ci #5745

Merged
merged 3 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/hardhat-core-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ on:
- "packages/hardhat-core/**"
- "packages/hardhat-common/**"
workflow_dispatch:
inputs:
test-all-solc-versions:
description: Test all solc versions
required: false
default: "false"

defaults:
run:
Expand Down Expand Up @@ -63,6 +68,7 @@ jobs:
DO_NOT_SET_THIS_ENV_VAR____IS_HARDHAT_CI: true
FORCE_COLOR: 3
NODE_OPTIONS: --max-old-space-size=4096
HARDHAT_TESTS_ALL_SOLC_VERSIONS: ${{ github.event.inputs.test-all-solc-versions}}
run: pnpm test:except-provider

test-provider:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ There are two other directories under `test-files`. One is `version-independent`

## How tests are executed

The `compilers-list.ts` module has a list of solc versions that can be used by these tests. By default, only the ones that have `latestSolcVersion: true` are run, but we have a [CI workflow](https://github.com/NomicFoundation/hardhat/actions/workflows/hardhat-network-tracing-all-solc-versions.yml) that runs once per day and executes these tests using all the available compilers.
The `compilers-list.ts` module has a list of solc versions that can be used by these tests. By default, only the ones that have `latestSolcVersion: true` are run, but we have a [CI workflow](https://github.com/NomicFoundation/hardhat/actions/workflows/hardhat-core-ci.yml) that you can trigger manually with the `test-all-solc-versions` input set to `true` to executes the tests using all the available compilers.

These compilers are grouped by minor version (that is, a group with all the 0.5.x compilers, a group all the 0.6.x compilers and so on) and each group is used to run the tests in the corresponding directory (`test-files/0_5`, `test-files/0_6`, and so on).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ async function runCallTransactionTest(
}

const onlyLatestSolcVersions =
process.env.HARDHAT_TESTS_ALL_SOLC_VERSIONS === undefined;
process.env.HARDHAT_TESTS_ALL_SOLC_VERSIONS !== "true";

const filterSolcVersionBy =
(versionRange: string) =>
Expand Down