Skip to content

Commit

Permalink
ci: add golang-modules-tidy job and run tests from module directories
Browse files Browse the repository at this point in the history
  • Loading branch information
geoknee committed Jan 30, 2024
1 parent 32208a8 commit d378de1
Showing 1 changed file with 31 additions and 14 deletions.
45 changes: 31 additions & 14 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,46 @@ jobs:
working_directory: ~/superchain-registry/
executor:
name: go/default # is based on cimg/go
tag: '1.20'
tag: '1.21'
steps:
- checkout:
path: ~/superchain-registry
- run: golangci-lint run superchain validation
golang-modules-tidy:
working_directory: ~/superchain-registry
executor:
name: go/default # is based on cimg/go
tag: '1.21'
steps:
- checkout:
path: ~/superchain-registry
- run:
name: tidy superchain module
command: go mod tidy
working_directory: superchain
- run:
name: tidy validation module
command: go mod tidy
working_directory: validation
- run:
name: check git tree is clean
command: git diff --exit-code
golang-test:
working_directory: ~/superchain-registry/
working_directory: ~/superchain-registry
executor:
name: go/default # is based on cimg/go
tag: '1.20'
tag: '1.21'
steps:
- checkout:
path: ~/superchain-registry
- go/mod-download
- go/test:
packages: ./superchain/...
covermode: atomic
failfast: true
race: true
- go/test:
packages: ./validation/...
covermode: atomic
failfast: true
race: true
- run:
name: run superchain module tests
command: go test ./... -v
working_directory: superchain
- run:
name: run validation module tests
command: go test ./... -v
working_directory: validation
publish-bot:
environment:
NODE_AUTH_TOKEN: $NPM_TOKEN # Use NPM_TOKEN as the auth token
Expand Down Expand Up @@ -90,6 +106,7 @@ workflows:
main:
jobs:
- golang-lint
- golang-modules-tidy
- golang-test
- check-codegen
- check-forge-fmt
Expand Down

0 comments on commit d378de1

Please sign in to comment.