Skip to content

Conversation

@RonTuretzky
Copy link
Contributor

Summary

  • Remove foundry-counter submodule and integration-test.yml
  • Add local test framework in tests/ and scripts/
  • Rename workflow titles for clarity
  • Add test.yml workflow to run tests in CI
  • Update README with new testing approach

Workflow Name Changes

Old Name New Name
Foundry CI Build & Test
Foundry CI/CD CI/CD Pipeline
Deploy Deploy & Verify
Detect Changes Detect Contract Changes
Post Mainnet Post-Deploy Snapshots
Upgrade Safety Upgrade Safety Check

Testing Approach

The workflow logic is tested by extracting testable shell functions into standalone scripts, then running them against test fixtures that cover success and failure cases.

Why This Approach?

  1. No external dependencies: Tests run locally without needing a real Foundry project
  2. Fast feedback: Shell scripts run instantly vs. waiting for GitHub Actions
  3. Complete coverage: Can test failure cases that would be hard to trigger in integration tests
  4. Reproducible: Same tests run locally and in CI

Running Tests

./tests/run-all.sh

Test Coverage

Test Suite Validates
test-compiler-config.sh bytecode_hash and cbor_metadata validation
test-baseline-detection.sh Baseline directory detection and fallback logic

Changes:
- Remove foundry-counter submodule and integration-test.yml
- Add local test framework in tests/ and scripts/
- Rename workflow titles for clarity:
  - Foundry CI -> Build & Test
  - Foundry CI/CD -> CI/CD Pipeline
  - Deploy -> Deploy & Verify
  - Detect Changes -> Detect Contract Changes
  - Post Mainnet -> Post-Deploy Snapshots
  - Upgrade Safety -> Upgrade Safety Check
- Add test.yml workflow to run tests in CI
- Update README with new testing approach

Testing approach:
- Extract testable logic from workflows into scripts/
- Test against fixtures covering success and failure cases
- Runs locally (./tests/run-all.sh) and in CI

Test coverage:
- Compiler config validation (bytecode_hash, cbor_metadata)
- Baseline detection (primary path, fallback, missing)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants