Skip to content
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
92 changes: 52 additions & 40 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1073,6 +1073,7 @@ jobs:
default: "go-tests-short-ci"
machine: true
resource_class: <<parameters.resource_class>>
circleci_ip_ranges: true
steps:
- checkout-from-workspace
- run:
Expand Down Expand Up @@ -1182,37 +1183,41 @@ jobs:
description: Timeout for when CircleCI kills the job if there's no output
type: string
default: 30m
use_circleci_runner:
description: Whether to use CircleCI runners (with Docker) instead of self-hosted runners
type: boolean
default: false
machine:
image: ubuntu-2404:current
docker_layer_caching: true # Since we are building docker images for components, we'll cache the layers for faster builds
resource_class: xlarge
image: <<# parameters.use_circleci_runner >>ubuntu-2404:current<</ parameters.use_circleci_runner >><<^ parameters.use_circleci_runner >>true<</ parameters.use_circleci_runner >>
docker_layer_caching: <<parameters.use_circleci_runner>>
resource_class: <<# parameters.use_circleci_runner >>xlarge<</ parameters.use_circleci_runner >><<^ parameters.use_circleci_runner >>ethereum-optimism/latitude-1<</ parameters.use_circleci_runner >>
steps:
- checkout-from-workspace
- run:
name: Setup Kurtosis (if needed)
command: |
if [[ "<<parameters.devnet>>" != "" ]]; then
echo "Setting up Kurtosis for external devnet testing..."
- unless:
condition:
equal: ["",<<parameters.devnet>>]
steps:
- run:
name: Setup Kurtosis
command: |
echo "Setting up Kurtosis for external devnet testing..."

# Print Kurtosis version
echo "Using Kurtosis from: $(which kurtosis || echo 'not found')"
kurtosis version
# Print Kurtosis version
echo "Using Kurtosis from: $(which kurtosis || echo 'not found')"
kurtosis version

# Start Kurtosis engine
echo "Starting Kurtosis engine..."
kurtosis engine start || true
# Start Kurtosis engine
echo "Starting Kurtosis engine..."
kurtosis engine start || true

# Clean old instances
echo "Cleaning old instances..."
kurtosis clean -a || true
# Clean old instances
echo "Cleaning old instances..."
kurtosis clean -a || true

# Check engine status
kurtosis engine status || true
# Check engine status
kurtosis engine status || true

echo "Kurtosis setup complete"
else
echo "Using in-process testing (sysgo orchestrator) - no Kurtosis setup needed"
fi
echo "Kurtosis setup complete"
# Notify us of a setup failure
- when:
condition: on_fail
Expand Down Expand Up @@ -1241,16 +1246,20 @@ jobs:
command: go test -v -c -o /dev/null $(go list -f '{{if .TestGoFiles}}{{.ImportPath}}{{end}}' ./tests/...)
# Run the acceptance tests (if the devnet is running)
- run:
name: Run acceptance tests (gate=<<parameters.gate>>)
name: Run acceptance tests (devnet=<<parameters.devnet>>, gate=<<parameters.gate>>)
working_directory: op-acceptance-tests
no_output_timeout: 1h
environment:
GOFLAGS: "-mod=mod"
GO111MODULE: "on"
GOGC: "0"
command: |
# Run the tests
LOG_LEVEL=debug just acceptance-test "<<parameters.devnet>>" "<<parameters.gate>>"
if [[ "<<parameters.gate>>" == "" ]]; then
echo "Running in gateless mode - auto-discovering all tests in ./op-acceptance-tests/..."
else
echo "Running in gate mode (gate=<<parameters.gate>>)"
fi
LOG_LEVEL=info just acceptance-test "<<parameters.devnet>>" "<<parameters.gate>>"
- run:
name: Print results (summary)
working_directory: op-acceptance-tests
Expand Down Expand Up @@ -1390,8 +1399,9 @@ jobs:
- "op-program/bin/meta*"

publish-cannon-prestates:
machine: true
resource_class: ethereum-optimism/latitude-1
resource_class: medium
docker:
- image: <<pipeline.parameters.default_docker_image>>
steps:
- utils/checkout-with-mise
- attach_workspace:
Expand Down Expand Up @@ -2474,13 +2484,11 @@ workflows:
- circleci-repo-readonly-authenticated-github-token
requires:
- initialize
# IN-PROCESS (base)
# IN-MEMORY (all)
- op-acceptance-tests:
# Acceptance Testing params
name: memory-base
gate: base
# CircleCI params
no_output_timeout: 10m
name: memory-all
gate: "" # Empty gate = gateless mode
no_output_timeout: 90m
context:
- circleci-repo-readonly-authenticated-github-token
- discord
Expand All @@ -2493,6 +2501,7 @@ workflows:
name: kurtosis-simple
devnet: simple
gate: base
use_circleci_runner: true
# CircleCI params
no_output_timeout: 30m
context:
Expand All @@ -2506,6 +2515,7 @@ workflows:
name: kurtosis-isthmus
devnet: isthmus
gate: isthmus
use_circleci_runner: true
# CircleCI params
no_output_timeout: 30m
context:
Expand All @@ -2519,6 +2529,7 @@ workflows:
name: kurtosis-interop
devnet: interop
gate: interop
use_circleci_runner: true
# CircleCI params
no_output_timeout: 30m
context:
Expand Down Expand Up @@ -2552,13 +2563,11 @@ workflows:
- circleci-repo-readonly-authenticated-github-token
requires:
- initialize
# IN-PROCESS (base)
# IN-MEMORY (all)
- op-acceptance-tests:
# Acceptance Testing params
name: memory-base
gate: base
# CircleCI params
no_output_timeout: 10m
name: memory-all
gate: "" # Empty gate = gateless mode
no_output_timeout: 60m
context:
- circleci-repo-readonly-authenticated-github-token
- discord
Expand All @@ -2571,6 +2580,7 @@ workflows:
name: kurtosis-simple
devnet: simple
gate: base
use_circleci_runner: true
# CircleCI params
no_output_timeout: 30m
context:
Expand All @@ -2584,6 +2594,7 @@ workflows:
name: kurtosis-isthmus
devnet: isthmus
gate: isthmus
use_circleci_runner: true
# CircleCI params
no_output_timeout: 30m
context:
Expand All @@ -2597,6 +2608,7 @@ workflows:
name: kurtosis-interop
devnet: interop
gate: interop
use_circleci_runner: true
# CircleCI params
no_output_timeout: 30m
context:
Expand Down
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@ TEST_PKGS := \
./packages/contracts-bedrock/scripts/checks/... \
./op-dripper/... \
./devnet-sdk/... \
./op-acceptance-tests/... \
./kurtosis-devnet/... \
./op-devstack/... \
./op-deployer/pkg/deployer/artifacts/... \
Expand Down Expand Up @@ -265,7 +264,7 @@ go-tests-short: $(TEST_DEPS) ## Runs comprehensive Go tests with -short flag
go-tests-short-ci: ## Runs short Go tests with gotestsum for CI (assumes deps built by CI)
@echo "Setting up test directories..."
mkdir -p ./tmp/test-results ./tmp/testlogs
@echo "Running Go tests with gotestsum..."
@echo 'Running Go tests (short) with gotestsum...'
$(DEFAULT_TEST_ENV_VARS) && \
$(CI_ENV_VARS) && \
gotestsum --format=testname \
Expand Down
2 changes: 1 addition & 1 deletion mise.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ anvil = "1.1.0"
codecov-uploader = "0.8.0"
goreleaser-pro = "2.11.2"
kurtosis = "1.8.1"
op-acceptor = "op-acceptor/v3.0.0"
op-acceptor = "op-acceptor/v3.1.0"

# Fake dependencies
# Put things here if you need to track versions of tools or projects that can't
Expand Down
22 changes: 20 additions & 2 deletions op-acceptance-tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ For rapid test development, use in-process testing:

```bash
cd op-acceptance-tests
just acceptance-test "" base # Uses sysgo orchestrator - faster!
# Not providing a network uses the sysgo orchestrator (in-memory network) which is faster and easier to iterate with.
just acceptance-test "" base
```

### Testing Against External Devnets
Expand Down Expand Up @@ -163,8 +164,25 @@ To add new acceptance tests:
package: github.com/ethereum-optimism/optimism/your/package/path
```

### Quick Development

For rapid development and testing:

```bash
cd op-acceptance-tests

# Run all tests (sysgo gateless mode) - most comprehensive coverage
just acceptance-test "" ""

# Run specific gate-based tests (traditional mode)
just acceptance-test "" base # In-process (sysgo) with gate
just acceptance-test simple base # External devnet (sysext) with gate
```

Using an empty gate (`""`) triggers gateless mode with the sysgo orchestrator, auto-discovering all tests.

## Further Information

For more details about `op-acceptor` and the acceptance testing process, refer to the main documentation or ask the team for guidance.

The source code for `op-acceptor` is available at [github.com/ethereum-optimism/infra/op-acceptor](https://github.com/ethereum-optimism/infra/tree/main/op-acceptor). If you discover any bugs or have feature requests, please open an issue in that repository.
The source code for `op-acceptor` is available at [github.com/ethereum-optimism/infra/op-acceptor](https://github.com/ethereum-optimism/infra/tree/main/op-acceptor). If you discover any bugs or have feature requests, please open an issue in that repository.
5 changes: 5 additions & 0 deletions op-acceptance-tests/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,11 @@ func runOpAcceptor(ctx context.Context, tracer trace.Tracer, orchestrator string
args = append(args, "--devnet-env-url", devnetEnvURL)
}

// For sysgo, we allow skips
if orchestrator == "sysgo" {
args = append(args, "--allow-skips")
}

acceptorCmd := exec.CommandContext(ctx, acceptor, args...)
acceptorCmd.Env = env
acceptorCmd.Stdout = os.Stdout
Expand Down
Loading