forked from ethereum-optimism/superchain-registry
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.yml
131 lines (126 loc) · 3.17 KB
/
config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
version: 2.1
orbs:
go: circleci/[email protected]
slack: circleci/[email protected]
commands:
notify-failures-on-main:
description: "Notify Slack"
parameters:
channel:
type: string
default: C03N11M0BBN
steps:
- slack/notify:
channel: << parameters.channel >>
event: fail
template: basic_fail_1
branch_pattern: main
jobs:
golang-lint:
executor:
name: go/default # is based on cimg/go
tag: '1.21'
steps:
- checkout
- run: golangci-lint run superchain/... validation/...
golang-modules-tidy:
executor:
name: go/default # is based on cimg/go
tag: '1.21'
steps:
- checkout
- 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:
executor:
name: go/default # is based on cimg/go
tag: '1.21'
steps:
- checkout
- 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
- notify-failures-on-main
publish-bot:
environment:
NODE_AUTH_TOKEN: $NPM_TOKEN # Use NPM_TOKEN as the auth token
docker:
- image: cimg/node:18 # Use Node.js 18
steps:
- checkout
- run:
name: Set deployment token
command: npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
- env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- run:
name: Build and publish package on NPM 📦
command: pnpm release
check-codegen:
docker:
- image: cimg/node:18.18.2
steps:
- checkout
- run:
name: Run codegen
command: pnpm codegen
- run:
name: Check for changes
command: git diff --exit-code
check-forge-fmt:
docker:
- image: us-docker.pkg.dev/oplabs-tools-artifacts/images/ci-builder:v0.40.0
steps:
- checkout
- run:
name: check compliance with forge fmt
command: |
forge fmt --check
check-security-configs:
circleci_ip_ranges: true
docker:
- image: us-docker.pkg.dev/oplabs-tools-artifacts/images/ci-builder:v0.40.0
steps:
- checkout
- run:
name: check security configs
command: sh ./scripts/check-security-configs.sh
- notify-failures-on-main
workflows:
hourly:
jobs:
- golang-test:
context:
- slack
- check-security-configs:
context:
- slack
triggers:
- schedule:
cron: "0 * * * *"
filters:
branches:
only:
- main
pr-checks:
jobs:
- golang-lint
- golang-modules-tidy
- golang-test
- check-codegen
- check-forge-fmt
- check-security-configs