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

test: forge test should be all green and exclude tests that require anvil #11148

Merged

Commits on Jul 18, 2024

  1. test(devchain/e2e): moves e2e demo test into new devchain/ directory

    This allows us to exclude all tests in the `devchain/` directory when running `forge test`
    arthurgousset committed Jul 18, 2024
    Configuration menu
    Copy the full SHA
    6212176 View commit details
    Browse the repository at this point in the history
  2. test(devchain/migration): renames migration test to Migration.t.sol

    Previously this was called Integration.t.sol, but that's not super obvious naming.
    arthurgousset committed Jul 18, 2024
    Configuration menu
    Copy the full SHA
    29c2ef3 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    703abe2 View commit details
    Browse the repository at this point in the history
  4. feat(foundry.toml): adds profile for tests that require a devchain

    The configs of this profile extend or overwrite the default profile. That means we can customise the `match_path` and `no_match_path` configs in that profile and run `forge test` with that profile by passing an environment variable `FOUNDRY_PROFILE=devchain`.
    
    For example, once a devchain is serving at localhost:
    
    ```sh
    FOUNDRY_PROFILE=devchain forge test -vvv \
    --match-path "test-sol/devchain/e2e/*" \
    --fork-url $ANVIL_RPC_URL
    [⠒] Compiling...
    No files changed, compilation skipped
    
    Ran 1 test for test-sol/devchain/e2e/common/FeeCurrencyDirectory.t.sol:E2EDemo
    [PASS] test_ShouldAllowOwnerSetCurrencyConfig() (gas: 94493)
    Suite result: ok. 1 passed; 0 failed; 0 skipped; finished in 12.92ms (2.35ms CPU time)
    
    Ran 1 test suite in 164.71ms (12.92ms CPU time): 1 tests passed, 0 failed, 0 skipped (1 total tests)
    ```
    arthurgousset committed Jul 18, 2024
    Configuration menu
    Copy the full SHA
    254bf9c View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    a49e3bc View commit details
    Browse the repository at this point in the history
  6. feat(workflows): adds profile env variable to CI workflows

    This ensures that the correct profile is consumed on CI and the correct tests are run.
    arthurgousset committed Jul 18, 2024
    Configuration menu
    Copy the full SHA
    7ea5e86 View commit details
    Browse the repository at this point in the history
  7. feat(workflows): adds profile env variable to CI workflows

    This ensures that the correct profile is consumed on CI and the correct tests are run.
    arthurgousset committed Jul 18, 2024
    Configuration menu
    Copy the full SHA
    1b07f30 View commit details
    Browse the repository at this point in the history
  8. Trigger Build

    alvarof2 committed Jul 18, 2024
    Configuration menu
    Copy the full SHA
    125391c View commit details
    Browse the repository at this point in the history

Commits on Jul 19, 2024

  1. docs(README): add note on devchain tests

    Co-authored-by: Martín Volpe <[email protected]>
    arthurgousset and martinvol authored Jul 19, 2024
    Configuration menu
    Copy the full SHA
    64508c0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    76edba3 View commit details
    Browse the repository at this point in the history