-
-
Notifications
You must be signed in to change notification settings - Fork 8
175 lines (159 loc) · 4.6 KB
/
e2e.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
name: E2E
on:
push:
tags:
- v*
branches:
- master
pull_request:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
jobs:
vault:
runs-on: ubuntu-latest
services:
vault:
image: "hashicorp/vault"
ports:
- 8200:8200
env:
VAULT_DEV_ROOT_TOKEN_ID: testtoken
steps:
- uses: actions/[email protected]
- name: Install Go
uses: actions/[email protected]
with:
go-version: 1.21.x
cache: false
- name: Get Go environment
id: go-env
run: |
echo "::set-output name=cache::$(go env GOCACHE)"
echo "::set-output name=modcache::$(go env GOMODCACHE)"
- name: Set up cache
uses: actions/[email protected]
with:
path: |
${{ steps.go-env.outputs.cache }}
${{ steps.go-env.outputs.modcache }}
key: check-mod-${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
check-mod-${{ runner.os }}-go-
- name: Run tests
env:
VAULT_ADDR: "http://localhost:8200"
VAULT_TOKEN: "testtoken"
run: make e2e_vault_test
- name: Send coverage
uses: codecov/[email protected]
with:
file: profile.out
redis:
runs-on: ubuntu-latest
services:
redis:
image: "redis:latest"
ports:
- 6379:6379
steps:
- uses: actions/[email protected]
- name: Install Go
uses: actions/[email protected]
with:
go-version: 1.21.x
cache: false
- name: Get Go environment
id: go-env
run: |
echo "::set-output name=cache::$(go env GOCACHE)"
echo "::set-output name=modcache::$(go env GOMODCACHE)"
- name: Set up cache
uses: actions/[email protected]
with:
path: |
${{ steps.go-env.outputs.cache }}
${{ steps.go-env.outputs.modcache }}
key: check-mod-${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
check-mod-${{ runner.os }}-go-
- name: Run tests
env:
REDIS_ADDR: "localhost:6379"
run: make e2e_redis_test
- name: Send coverage
uses: codecov/[email protected]
with:
file: profile.out
s3:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Install Go
uses: actions/[email protected]
with:
go-version: 1.21.x
cache: false
- name: Get Go environment
id: go-env
run: |
echo "::set-output name=cache::$(go env GOCACHE)"
echo "::set-output name=modcache::$(go env GOMODCACHE)"
- name: Set up cache
uses: actions/[email protected]
with:
path: |
${{ steps.go-env.outputs.cache }}
${{ steps.go-env.outputs.modcache }}
key: check-mod-${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
check-mod-${{ runner.os }}-go-
- name: Setup minio
run: |
docker run -d -p 9000:9000 --name minio \
-e "MINIO_ACCESS_KEY=minioadmin" \
-e "MINIO_SECRET_KEY=minioadmin" \
-v /tmp/data:/data \
-v /tmp/config:/root/.minio \
minio/minio server /data
- name: Run tests
env:
MINIO_ACCESS_KEY: minioadmin
MINIO_SECRET_KEY: minioadmin
S3_ADDR: "localhost:9000"
run: make e2e_s3_test
- name: Send coverage
uses: codecov/[email protected]
with:
file: profile.out
tg_io:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Install Go
uses: actions/[email protected]
with:
go-version: 1.21.x
cache: false
- name: Get Go environment
id: go-env
run: |
echo "::set-output name=cache::$(go env GOCACHE)"
echo "::set-output name=modcache::$(go env GOMODCACHE)"
- name: Set up cache
uses: actions/[email protected]
with:
path: |
${{ steps.go-env.outputs.cache }}
${{ steps.go-env.outputs.modcache }}
key: check-mod-${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
check-mod-${{ runner.os }}-go-
- name: Run tests
env:
TG_IO_E2E: 1
run: make e2e_tg_io_test
- name: Send coverage
uses: codecov/[email protected]
with:
file: profile.out