Commit d139cc98 authored by smartcontracts's avatar smartcontracts Committed by GitHub

fix(ci): contracts test names check failures (#13034)

lint-forge-tests-check-no-build was causing issues in CI because
it was running as part of contracts-bedrock-checks which depends
on contracts-bedrock-build. contracts-bedrock-build builds the
contract files EXCEPT for tests whenever contracts-bedrock has
changed. This means that contracts-bedrock-build would not build
any test files and therefore lint-forge-tests-check-no-build would
not find any test files to check and the job would do nothing.
However, when contracts-bedrock is NOT changed, the build job gets
the full set of artifacts INCLUDING test artifacts from the cache.
This would trigger the full check to actually be run and it would
properly fail.

This PR moves that particular check into contracts-bedrock-tests
so that it's guaranteed to have all of the compiled contracts.
parent f9a38de2
...@@ -684,6 +684,10 @@ jobs: ...@@ -684,6 +684,10 @@ jobs:
name: Build go-ffi name: Build go-ffi
command: just build-go-ffi command: just build-go-ffi
working_directory: packages/contracts-bedrock working_directory: packages/contracts-bedrock
- run:
name: Lint forge test names
command: just lint-forge-tests-check-no-build
working_directory: packages/contracts-bedrock
- run: - run:
name: Run tests name: Run tests
command: | command: |
...@@ -750,22 +754,7 @@ jobs: ...@@ -750,22 +754,7 @@ jobs:
- run-contracts-check: - run-contracts-check:
command: unused-imports-check-no-build command: unused-imports-check-no-build
- run-contracts-check: - run-contracts-check:
command: lint-forge-tests-check-no-build command: validate-spacers-no-build
contracts-bedrock-validate-spacers:
docker:
- image: <<pipeline.parameters.ci_builder_image>>
resource_class: medium
steps:
- checkout
- attach_workspace: { at: "." }
- install-contracts-dependencies
- check-changed:
patterns: contracts-bedrock
- run:
name: validate spacers
command: just validate-spacers-no-build
working_directory: packages/contracts-bedrock
todo-issues: todo-issues:
parameters: parameters:
...@@ -1366,9 +1355,6 @@ workflows: ...@@ -1366,9 +1355,6 @@ workflows:
- contracts-bedrock-checks: - contracts-bedrock-checks:
requires: requires:
- contracts-bedrock-build - contracts-bedrock-build
- contracts-bedrock-validate-spacers:
requires:
- contracts-bedrock-build
- semgrep-scan: - semgrep-scan:
name: semgrep-scan-local name: semgrep-scan-local
scan_command: semgrep scan --timeout=100 --config .semgrep/rules/ --error . scan_command: semgrep scan --timeout=100 --config .semgrep/rules/ --error .
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment