Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
48ed4e8c
Unverified
Commit
48ed4e8c
authored
Aug 28, 2023
by
OptimismBot
Committed by
GitHub
Aug 28, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7033 from bobanetwork/ci-move-e2e-to-make
ci: Convert go-e2e-tests CI to make targets
parents
576ee49d
f0dc4e16
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
43 deletions
+40
-43
config.yml
.circleci/config.yml
+8
-30
Makefile
op-e2e/Makefile
+32
-13
No files found.
.circleci/config.yml
View file @
48ed4e8c
...
@@ -775,11 +775,8 @@ jobs:
...
@@ -775,11 +775,8 @@ jobs:
module
:
module
:
description
:
Go Module Name
description
:
Go Module Name
type
:
string
type
:
string
use_http
:
target
:
description
:
If the op-e2e package should use HTTP clients
description
:
The make target to execute
type
:
string
use_external
:
description
:
The extra-process shim (if any) that should be used
type
:
string
type
:
string
docker
:
docker
:
-
image
:
us-docker.pkg.dev/oplabs-tools-artifacts/images/ci-builder:latest
-
image
:
us-docker.pkg.dev/oplabs-tools-artifacts/images/ci-builder:latest
...
@@ -791,13 +788,6 @@ jobs:
...
@@ -791,13 +788,6 @@ jobs:
-
run
:
-
run
:
name
:
prep results dir
name
:
prep results dir
command
:
mkdir -p /tmp/test-results
command
:
mkdir -p /tmp/test-results
-
when
:
condition
:
<<parameters.use_external>>
steps
:
-
run
:
name
:
Build Shim
command
:
make -C <<parameters.use_external>>
working_directory
:
<<parameters.module>>
-
run
:
-
run
:
name
:
install geth
name
:
install geth
command
:
make install-geth
command
:
make install-geth
...
@@ -807,21 +797,12 @@ jobs:
...
@@ -807,21 +797,12 @@ jobs:
-
run
:
-
run
:
name
:
print go's available MIPS targets
name
:
print go's available MIPS targets
command
:
go tool dist list | grep mips
command
:
go tool dist list | grep mips
-
run
:
name
:
Run all init steps for op-e2e
command
:
make pre-test
working_directory
:
<<parameters.module>>
-
run
:
-
run
:
name
:
run tests
name
:
run tests
command
:
|
command
:
# Note: We don't use circle CI test splits because we need to split by test name, not by package. There is an additional
# Note: We don't use circle CI test splits because we need to split by test name, not by package. There is an additional
# constraint that gotestsum does not currently (nor likely will) accept files from different pacakges when building.
# constraint that gotestsum does not currently (nor likely will) accept files from different pacakges when building.
# Note: -parallel must be set to match the number of cores in the resource class
JUNIT_FILE=/tmp/test-results/<<parameters.module>>_<<parameters.target>>.xml make <<parameters.target>>
export TEST_SUFFIX="<<parameters.use_external>>"
export EXTERNAL_L2="$(test -z '<<parameters.use_external>>' || echo '<<parameters.use_external>>/shim')"
OP_TESTLOG_DISABLE_COLOR=true OP_E2E_DISABLE_PARALLEL=false OP_E2E_USE_HTTP=<<parameters.use_http>> gotestsum \
--format=standard-verbose --junitfile=/tmp/test-results/<<parameters.module>>_http_<<parameters.use_http>>$TEST_SUFFIX.xml \
-- -timeout=20m -parallel=8 --externalL2 "$EXTERNAL_L2" ./...
working_directory
:
<<parameters.module>>
working_directory
:
<<parameters.module>>
-
store_test_results
:
-
store_test_results
:
path
:
/tmp/test-results
path
:
/tmp/test-results
...
@@ -1232,18 +1213,15 @@ workflows:
...
@@ -1232,18 +1213,15 @@ workflows:
-
go-e2e-test
:
-
go-e2e-test
:
name
:
op-e2e-WS-tests
name
:
op-e2e-WS-tests
module
:
op-e2e
module
:
op-e2e
use_http
:
"
false"
target
:
test-ws
use_external
:
"
"
-
go-e2e-test
:
-
go-e2e-test
:
name
:
op-e2e-HTTP-tests
name
:
op-e2e-HTTP-tests
module
:
op-e2e
module
:
op-e2e
use_http
:
"
true"
target
:
test-http
use_external
:
"
"
-
go-e2e-test
:
-
go-e2e-test
:
name
:
op-e2e-
WS-tests-external-geth
name
:
op-e2e-
ext-geth-tests
module
:
op-e2e
module
:
op-e2e
use_http
:
"
false"
target
:
test-external-geth
use_external
:
"
external_geth"
-
bedrock-go-tests
:
-
bedrock-go-tests
:
requires
:
requires
:
-
op-batcher-lint
-
op-batcher-lint
...
...
op-e2e/Makefile
View file @
48ed4e8c
test
:
pre-test
# Generally, JUNIT_FILE is set in CI but may be specified to an arbitrary file location to emulate CI locally
go
test
-v
./...
ifdef
JUNIT_FILE
go_test
=
OP_TESTLOG_DISABLE_COLOR
=
true
OP_E2E_DISABLE_PARALLEL
=
false
gotestsum
--format
=
standard-verbose
--junitfile
=
$(JUNIT_FILE)
--
# Note: -parallel must be set to match the number of cores in the resource class
go_test_flags
=
-timeout
=
20m
-parallel
=
8
else
go_test
=
go
test
go_test_flags
=
-v
endif
test
:
pre-test test-ws
.PHONY
:
test
test-external-%
:
pre-test
make
-C
./external_
$*
/
$(go_test)
$(go_test_flags)
--externalL2
./external_
$*
/shim
test-ws
:
pre-test
$(go_test)
$(go_test_flags)
./...
.PHONY
:
test-ws
test-http
:
pre-test
OP_E2E_USE_HTTP
=
true
$(go_test)
$(go_test_flags)
./...
.PHONY
:
test-ws
cannon-prestate
:
cannon-prestate
:
make
-C
.. cannon-prestate
make
-C
.. cannon-prestate
.PHONY
:
cannon-prestate
# We depend on the absolute pre-state generated by cannon to deploy the dispute game contracts.
# We depend on the absolute pre-state generated by cannon to deploy the dispute game contracts.
devnet-allocs
:
pre-test-cannon
devnet-allocs
:
pre-test-cannon
make
-C
.. devnet-allocs
make
-C
.. devnet-allocs
.PHONY
:
devnet-allocs
pre-test
:
pre-test-cannon pre-test-allocs
pre-test
:
pre-test-cannon pre-test-allocs
.PHONY
:
pre-test
pre-test-cannon
:
pre-test-cannon
:
@
if
[
!
-e
../op-program/bin
]
;
then
\
@
if
[
!
-e
../op-program/bin
]
;
then
\
make cannon-prestate
;
\
make cannon-prestate
;
\
fi
fi
.PHONY
:
pre-test-cannon
pre-test-allocs
:
pre-test-allocs
:
@
if
[
!
-e
../.devnet
]
;
then
\
@
if
[
!
-e
../.devnet
]
;
then
\
make devnet-allocs
;
\
make devnet-allocs
;
\
fi
fi
.PHONY
:
pre-test-allocs
clean
:
clean
:
rm
-r
../.devnet
rm
-r
../.devnet
rm
-r
../op-program/bin
rm
-r
../op-program/bin
.PHONY
:
clean
lint
:
lint
:
golangci-lint run
-E
goimports,sqlclosecheck,bodyclose,asciicheck,misspell,errorlint
--timeout
5m
-e
"errors.As"
-e
"errors.Is"
./...
golangci-lint run
-E
goimports,sqlclosecheck,bodyclose,asciicheck,misspell,errorlint
--timeout
5m
-e
"errors.As"
-e
"errors.Is"
./...
.PHONY
:
lint
test-external-%
:
pre-test
make
-C
./external_
$*
/
go
test
-v
--externalL2
./external_
$*
/shim
.PHONY
:
\
test
\
lint
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment