-
Notifications
You must be signed in to change notification settings - Fork 58
204 lines (202 loc) · 5.93 KB
/
plugins.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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
name: Build and validate Souin as plugins
on:
- pull_request
jobs:
build-caddy-validator:
name: Check that Souin build as caddy module
runs-on: ubuntu-latest
services:
redis:
image: redis
ports:
- 6379:6379
etcd:
image: quay.io/coreos/etcd
env:
ETCD_NAME: etcd0
ETCD_ADVERTISE_CLIENT_URLS: http://etcd:2379,http://etcd:4001
ETCD_LISTEN_CLIENT_URLS: http://0.0.0.0:2379,http://0.0.0.0:4001
ETCD_INITIAL_ADVERTISE_PEER_URLS: http://etcd:2380
ETCD_LISTEN_PEER_URLS: http://0.0.0.0:2380
ETCD_INITIAL_CLUSTER_TOKEN: etcd-cluster-1
ETCD_INITIAL_CLUSTER: etcd0=http://etcd:2380
ETCD_INITIAL_CLUSTER_STATE: new
ports:
- 2379:2379
- 2380:2380
- 4001:4001
steps:
-
name: Add domain.com host to /etc/hosts
run: |
sudo echo "127.0.0.1 domain.com etcd redis" | sudo tee -a /etc/hosts
-
name: Install Go
uses: actions/setup-go@v3
with:
go-version: '1.21'
-
name: Checkout code
uses: actions/checkout@v4
-
name: Install xcaddy
run: go install github.com/caddyserver/xcaddy/cmd/xcaddy@latest
-
name: Build Souin as caddy module
run: cd plugins/caddy && xcaddy build --with github.com/darkweak/souin/plugins/caddy=./ --with github.com/darkweak/souin@latest=../..
-
name: Run Caddy tests
run: cd plugins/caddy && go test -v ./...
-
name: Run detached caddy
run: cd plugins/caddy && ./caddy run &
-
name: Run Caddy E2E tests
uses: anthonyvscode/newman-action@v1
with:
collection: "docs/e2e/Souin E2E.postman_collection.json"
folder: Caddy
reporters: cli
delayRequest: 5000
-
name: Run detached caddy
run: cd plugins/caddy && ./caddy stop
-
name: Run detached caddy
run: cd plugins/caddy && ./caddy run --config ./configuration.json &
-
name: Run Caddy E2E tests
uses: anthonyvscode/newman-action@v1
with:
collection: "docs/e2e/Souin E2E.postman_collection.json"
folder: Caddy
reporters: cli
delayRequest: 5000
build-beego-validator:
name: Check that Souin build as middleware
uses: ./.github/workflows/plugin_template.yml
secrets: inherit
with:
CAPITALIZED_NAME: Beego
LOWER_NAME: beego
GO_VERSION: '1.21'
build-chi-validator:
name: Check that Souin build as middleware
uses: ./.github/workflows/plugin_template.yml
secrets: inherit
with:
CAPITALIZED_NAME: Chi
LOWER_NAME: chi
GO_VERSION: '1.21'
build-dotweb-validator:
name: Check that Souin build as middleware
uses: ./.github/workflows/plugin_template.yml
secrets: inherit
with:
CAPITALIZED_NAME: Dotweb
LOWER_NAME: dotweb
GO_VERSION: '1.21'
build-echo-validator:
name: Check that Souin build as middleware
uses: ./.github/workflows/plugin_template.yml
secrets: inherit
with:
CAPITALIZED_NAME: Echo
LOWER_NAME: echo
GO_VERSION: '1.21'
build-fiber-validator:
name: Check that Souin build as middleware
uses: ./.github/workflows/plugin_template.yml
secrets: inherit
with:
CAPITALIZED_NAME: Fiber
LOWER_NAME: fiber
GO_VERSION: '1.21'
build-gin-validator:
name: Check that Souin build as middleware
uses: ./.github/workflows/plugin_template.yml
secrets: inherit
with:
CAPITALIZED_NAME: Gin
LOWER_NAME: gin
GO_VERSION: '1.21'
build-goa-validator:
name: Check that Souin build as middleware
uses: ./.github/workflows/plugin_template.yml
secrets: inherit
with:
CAPITALIZED_NAME: Goa
LOWER_NAME: goa
GO_VERSION: '1.21'
build-go-zero-validator:
name: Check that Souin build as middleware
uses: ./.github/workflows/plugin_template.yml
secrets: inherit
with:
CAPITALIZED_NAME: Go-zero
LOWER_NAME: go-zero
GO_VERSION: '1.21'
build-hertz-validator:
name: Check that Souin build as middleware
uses: ./.github/workflows/plugin_template.yml
secrets: inherit
with:
CAPITALIZED_NAME: Hertz
LOWER_NAME: hertz
GO_VERSION: '1.21'
build-kratos-validator:
name: Check that Souin build as middleware
uses: ./.github/workflows/plugin_template.yml
secrets: inherit
with:
CAPITALIZED_NAME: Kratos
LOWER_NAME: kratos
GO_VERSION: '1.21'
build-roadrunner-validator:
name: Check that Souin build as middleware
uses: ./.github/workflows/plugin_template.yml
secrets: inherit
with:
CAPITALIZED_NAME: Roadrunner
LOWER_NAME: roadrunner
GO_VERSION: '1.21'
build-skipper-validator:
name: Check that Souin build as middleware
uses: ./.github/workflows/plugin_template.yml
secrets: inherit
with:
CAPITALIZED_NAME: Skipper
LOWER_NAME: skipper
GO_VERSION: '1.21'
build-souin-validator:
name: Check that Souin build as middleware
uses: ./.github/workflows/plugin_template.yml
secrets: inherit
with:
CAPITALIZED_NAME: Souin
LOWER_NAME: souin
GO_VERSION: '1.21'
build-traefik-validator:
name: Check that Souin build as middleware
uses: ./.github/workflows/plugin_template.yml
secrets: inherit
with:
CAPITALIZED_NAME: Traefik
LOWER_NAME: traefik
GO_VERSION: '1.21'
build-tyk-validator:
name: Check that Souin build as middleware
uses: ./.github/workflows/plugin_template.yml
secrets: inherit
with:
CAPITALIZED_NAME: Tyk
LOWER_NAME: tyk
GO_VERSION: '1.21'
build-webgo-validator:
name: Check that Souin build as middleware
uses: ./.github/workflows/plugin_template.yml
secrets: inherit
with:
CAPITALIZED_NAME: Webgo
LOWER_NAME: webgo
GO_VERSION: '1.21'