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

ci: clean up golang job definitions (#11967)

Cleans up a number of golang job definitions. One PR for now
just so I can see this all work.
parent 86a74bcc
...@@ -932,7 +932,7 @@ jobs: ...@@ -932,7 +932,7 @@ jobs:
description: Go Module Name description: Go Module Name
type: string type: string
docker: docker:
- image: <<pipeline.parameters.ci_builder_image>> # only used to enable codecov. - image: <<pipeline.parameters.ci_builder_image>>
resource_class: xlarge resource_class: xlarge
steps: steps:
- checkout - checkout
...@@ -944,13 +944,18 @@ jobs: ...@@ -944,13 +944,18 @@ jobs:
keys: keys:
- golang-build-cache-test-<<parameters.module>>-{{ checksum "go.sum" }} - golang-build-cache-test-<<parameters.module>>-{{ checksum "go.sum" }}
- golang-build-cache-test- - golang-build-cache-test-
- run:
name: Install components
command: |
go version
go install gotest.tools/gotestsum@v1.11.0
- run: - run:
name: prep results dir name: prep results dir
command: mkdir -p /tmp/test-results && mkdir -p /testlogs command: mkdir -p /tmp/test-results && mkdir -p /tmp/testlogs
- run: - run:
name: run tests name: run tests
command: | command: |
gotestsum --format=testname --junitfile=/tmp/test-results/<<parameters.module>>.xml --jsonfile=/testlogs/log.json \ gotestsum --format=testname --junitfile=/tmp/test-results/<<parameters.module>>.xml --jsonfile=/tmp/testlogs/log.json \
-- -parallel=8 -coverpkg=github.com/ethereum-optimism/optimism/... -coverprofile=coverage.out ./... -- -parallel=8 -coverpkg=github.com/ethereum-optimism/optimism/... -coverprofile=coverage.out ./...
working_directory: <<parameters.module>> working_directory: <<parameters.module>>
- save_cache: - save_cache:
...@@ -961,7 +966,7 @@ jobs: ...@@ -961,7 +966,7 @@ jobs:
- store_test_results: - store_test_results:
path: /tmp/test-results path: /tmp/test-results
- store_artifacts: - store_artifacts:
path: /testlogs path: /tmp/testlogs
when: always when: always
go-e2e-test: go-e2e-test:
...@@ -1650,25 +1655,17 @@ workflows: ...@@ -1650,25 +1655,17 @@ workflows:
requires: requires:
- go-mod-download - go-mod-download
- fuzz-golang: - fuzz-golang:
name: op-challenger-fuzz name: fuzz-golang-<<matrix.package_name>>
package_name: op-challenger requires:
on_changes: op-challenger - go-mod-download
requires: ["go-mod-download"] on_changes: <<matrix.package_name>>
- fuzz-golang: matrix:
name: op-node-fuzz parameters:
package_name: op-node package_name:
on_changes: op-node - op-challenger
requires: ["go-mod-download"] - op-node
- fuzz-golang: - op-service
name: op-service-fuzz - op-chain-ops
package_name: op-service
on_changes: op-service
requires: ["go-mod-download"]
- fuzz-golang:
name: op-chain-ops-fuzz
package_name: op-chain-ops
on_changes: op-chain-ops
requires: ["go-mod-download"]
- fuzz-golang: - fuzz-golang:
name: cannon-fuzz name: cannon-fuzz
package_name: cannon package_name: cannon
...@@ -1682,50 +1679,28 @@ workflows: ...@@ -1682,50 +1679,28 @@ workflows:
uses_artifacts: true uses_artifacts: true
requires: ["go-mod-download", "contracts-bedrock-build"] requires: ["go-mod-download", "contracts-bedrock-build"]
- go-test: - go-test:
name: op-batcher-tests name: <<matrix.module>>-tests
module: op-batcher requires:
requires: ["go-mod-download"] - go-mod-download
- go-test: matrix:
name: op-chain-ops-tests parameters:
module: op-chain-ops module:
- op-batcher
- op-chain-ops
- op-node
- op-proposer
- op-challenger
- op-dispute-mon
- op-conductor
- op-program
- op-service
- op-supervisor
- go-test-kurtosis: - go-test-kurtosis:
name: op-chain-ops-integration name: op-chain-ops-integration
module: op-chain-ops module: op-chain-ops
test_directory: ./deployer/integration_test test_directory: ./deployer/integration_test
uses_artifacts: true uses_artifacts: true
requires: ["contracts-bedrock-build"] requires: ["contracts-bedrock-build"]
- go-test:
name: op-node-tests
module: op-node
requires: ["go-mod-download"]
- go-test:
name: op-proposer-tests
module: op-proposer
requires: ["go-mod-download"]
- go-test:
name: op-challenger-tests
module: op-challenger
requires: ["go-mod-download"]
- go-test:
name: op-dispute-mon-tests
module: op-dispute-mon
requires: ["go-mod-download"]
- go-test:
name: op-conductor-tests
module: op-conductor
requires: ["go-mod-download"]
- go-test:
name: op-program-tests
module: op-program
requires: ["go-mod-download"]
- go-test:
name: op-service-tests
module: op-service
requires: ["go-mod-download"]
- go-test:
name: op-supervisor-tests
module: op-supervisor
requires: ["go-mod-download"]
- go-e2e-test: - go-e2e-test:
name: op-e2e-HTTP-tests<< matrix.variant >> name: op-e2e-HTTP-tests<< matrix.variant >>
matrix: matrix:
...@@ -1785,54 +1760,22 @@ workflows: ...@@ -1785,54 +1760,22 @@ workflows:
- op-e2e-action-tests - op-e2e-action-tests
- op-e2e-action-tests-altda - op-e2e-action-tests-altda
- docker-build: - docker-build:
name: op-node-docker-build name: <<matrix.docker_name>>-docker-build
docker_name: op-node
docker_tags: <<pipeline.git.revision>>,<<pipeline.git.branch>> docker_tags: <<pipeline.git.revision>>,<<pipeline.git.branch>>
save_image_tag: <<pipeline.git.revision>> # for devnet later save_image_tag: <<pipeline.git.revision>>
- docker-build: matrix:
name: op-batcher-docker-build parameters:
docker_name: op-batcher docker_name:
docker_tags: <<pipeline.git.revision>>,<<pipeline.git.branch>> - op-node
save_image_tag: <<pipeline.git.revision>> # for devnet later - op-batcher
- docker-build: - op-program
name: op-program-docker-build - op-proposer
docker_name: op-program - op-challenger
docker_tags: <<pipeline.git.revision>>,<<pipeline.git.branch>> - proofs-tools
# op-program is not part of the devnet, we don't save it. - op-dispute-mon
- docker-build: - op-conductor
name: op-proposer-docker-build - da-server
docker_name: op-proposer - op-supervisor
docker_tags: <<pipeline.git.revision>>,<<pipeline.git.branch>>
save_image_tag: <<pipeline.git.revision>> # for devnet later
- docker-build:
name: op-challenger-docker-build
docker_name: op-challenger
docker_tags: <<pipeline.git.revision>>,<<pipeline.git.branch>>
save_image_tag: <<pipeline.git.revision>> # for devnet later
- docker-build:
name: proofs-tools-docker-build
docker_name: proofs-tools
docker_tags: <<pipeline.git.revision>>,<<pipeline.git.branch>>
- docker-build:
name: op-dispute-mon-docker-build
docker_name: op-dispute-mon
docker_tags: <<pipeline.git.revision>>,<<pipeline.git.branch>>
save_image_tag: <<pipeline.git.revision>> # for devnet later
- docker-build:
name: op-conductor-docker-build
docker_name: op-conductor
docker_tags: <<pipeline.git.revision>>,<<pipeline.git.branch>>
# op-conductor is not part of the devnet, we don't save it.
- docker-build:
name: da-server-docker-build
docker_name: da-server
docker_tags: <<pipeline.git.revision>>,<<pipeline.git.branch>>
save_image_tag: <<pipeline.git.revision>> # for devnet later
- docker-build:
name: op-supervisor-docker-build
docker_name: op-supervisor
docker_tags: <<pipeline.git.revision>>,<<pipeline.git.branch>>
# op-supervisor is not (yet) part of the devnet, we don't save it
- cannon-prestate: - cannon-prestate:
requires: requires:
- go-mod-download - go-mod-download
......
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