forked from wal-g/wal-g
-
Notifications
You must be signed in to change notification settings - Fork 2
187 lines (172 loc) · 8.71 KB
/
dockertests.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
name: Docker tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
CACHE_FOLDER: ~/docker-images-${{ github.sha }}
CACHE_FILE_UBUNTU: ~/docker-images-${{ github.sha }}/wal-g_ubuntu.tgz
CACHE_FILE_GOLANG: ~/docker-images-${{ github.sha }}/wal-g_golang.tgz
CACHE_FILE_DOCKER_PREFIX: ~/docker-images-${{ github.sha }}/docker_prefix.tgz
IMAGE: wal-g/docker_prefix
IMAGE_UBUNTU: wal-g/ubuntu
IMAGE_GOLANG: wal-g/golang
IMAGES_CACHE_KEY: docker-images-${{ github.sha }}
GO_VERSION: "1.20"
jobs:
buildimages:
name: Build images
runs-on: ubuntu-20.04
steps:
# use cache to pass docker images to the test jobs
- name: Docker images caching
id: cache-images
uses: actions/cache@v3
with:
path: |
${{ env.CACHE_FILE_DOCKER_PREFIX }}
${{ env.CACHE_FILE_UBUNTU }}
${{ env.CACHE_FILE_GOLANG }}
key: ${{ env.IMAGES_CACHE_KEY }}
- name: Install deps
if: steps.cache-images.outputs.cache-hit != 'true'
run: sudo apt-get install liblzo2-dev
- name: Check out code into the Go module directory
if: steps.cache-images.outputs.cache-hit != 'true'
uses: actions/checkout@v3
- name: Set up Go 1.x
if: steps.cache-images.outputs.cache-hit != 'true'
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
id: go
- name: Get dependencies
if: steps.cache-images.outputs.cache-hit != 'true'
run: |
go get -v -t -d ./...
if [ -f Gopkg.toml ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
fi
# build images
- name: Build images
if: steps.cache-images.outputs.cache-hit != 'true'
run: make pg_save_image
env:
USE_BROTLI: 1
USE_LZO: 1
test:
name: test
runs-on: ubuntu-20.04
needs: [ buildimages ]
strategy:
matrix:
command: [ 'make TEST="pg_ready_rename_test" pg_integration_test',
'make TEST="pg_backup_mark_impermanent_test" pg_integration_test',
'make TEST="pg_backup_mark_permanent_test" pg_integration_test',
'make TEST="pg_config_test" pg_integration_test',
'make TEST="pg_crypto_test" pg_integration_test',
'make TEST="pg_copy_all_test" pg_integration_test',
'make TEST="pg_copy_backup_test" pg_integration_test',
'make TEST="pg_delta_backup_wal_delta_test" pg_integration_test',
'make TEST="pg_full_backup_test" pg_integration_test',
'make TEST="pg_full_backup_streamed_test" pg_integration_test',
'make TEST="pg_partial_restore_test" pg_integration_test',
'make TEST="pg_remote_backup_test" pg_integration_test',
'make TEST="pg_ssh_backup_test" pg_integration_test',
'make TEST="pg_receive_wal_test" pg_integration_test',
'make TEST="pg_full_backup_copy_composer_test" pg_integration_test',
'make TEST="pg_full_backup_rating_composer_test" pg_integration_test',
'make TEST="pg_full_backup_database_composer_test" pg_integration_test',
'make TEST="pg_full_backup_failover_storage_test" pg_integration_test',
'make TEST="pg_delete_before_name_find_full_test" pg_integration_test',
'make TEST="pg_delete_retain_full_test" pg_integration_test',
'make TEST="pg_delete_before_time_find_full_test" pg_integration_test',
'make TEST="pg_delete_without_confirm_test" pg_integration_test',
'make TEST="pg_ghost_table_test" pg_integration_test',
'make TEST="pg_delete_end_to_end_test" pg_integration_test',
'make TEST="pg_delta_backup_fullscan_test" pg_integration_test',
'make TEST="pg_several_delta_backups_test" pg_integration_test',
'make TEST="pg_several_delta_backups_reverse_test" pg_integration_test',
'make TEST="pg_delete_retain_find_full_test" pg_integration_test',
'make TEST="pg_wale_compatibility_test" pg_integration_test',
'make TEST="pg_delete_before_permanent_full_test" pg_integration_test',
'make TEST="pg_delete_before_permanent_delta_test" pg_integration_test',
'make TEST="pg_delete_target_test" pg_integration_test',
'make TEST="pg_delete_target_delta_test" pg_integration_test',
'make TEST="pg_delete_target_delta_find_full_test" pg_integration_test',
'make TEST="pg_backup_mark_permanent_no_error_test" pg_integration_test',
'make TEST="pg_delete_garbage_test" pg_integration_test',
'make TEST="pg_daemon_test" pg_integration_test',
'make TEST="pg_daemon_backup_and_restore_test" pg_integration_test',
'make TEST="pg_daemon_client_test" pg_integration_test',
'make mongo_test',
'make MONGO_VERSION="6.0.3" MONGO_MAJOR="6.0" MONGO_REPO="repo.mongodb.org" MONGO_PACKAGE="mongodb-org" mongo_features',
'make MONGO_VERSION="6.0.3" MONGO_MAJOR="6.0" MONGO_REPO="repo.mongodb.com" MONGO_PACKAGE="mongodb-enterprise" mongo_features',
'make MONGO_VERSION="5.0.13" MONGO_MAJOR="5.0" MONGO_REPO="repo.mongodb.org" MONGO_PACKAGE="mongodb-org" mongo_features',
'make MONGO_VERSION="5.0.13" MONGO_MAJOR="5.0" MONGO_REPO="repo.mongodb.com" MONGO_PACKAGE="mongodb-enterprise" mongo_features',
'make MONGO_VERSION="4.4.17" MONGO_MAJOR="4.4" MONGO_REPO="repo.mongodb.org" MONGO_PACKAGE="mongodb-org" mongo_features',
'make MONGO_VERSION="4.4.17" MONGO_MAJOR="4.4" MONGO_REPO="repo.mongodb.com" MONGO_PACKAGE="mongodb-enterprise" mongo_features',
'make MONGO_VERSION="4.2.23" MONGO_MAJOR="4.2" MONGO_REPO="repo.mongodb.org" MONGO_PACKAGE="mongodb-org" mongo_features',
'make redis_test',
'make REDIS_VERSION="5.0.8" redis_features',
'make REDIS_VERSION="6.0.8" redis_features',
'make REDIS_VERSION="6.2.4" redis_features',
'make FEATURE="backup" REDIS_VERSION="5.0.8" redis_features',
'make FEATURE="backup" REDIS_VERSION="6.0.8" redis_features',
'make FEATURE="backup" REDIS_VERSION="6.2.4" redis_features',
'make TEST="pg_wale_tablespace_compatibility_test" pg_integration_test',
'make TEST="pg_tablespace_support_test" pg_integration_test',
'make TEST="pg_wal_perftest" pg_integration_test',
'make TEST="pg_backup_perftest" pg_integration_test',
'make TEST="pg_catchup_test" pg_integration_test',
'make TEST="pg_wal_restore_test" pg_integration_test',
'make MYSQL_TEST=mysql_base_tests mysql_integration_test',
'make MYSQL_TEST=mysql_delete_tests mysql_integration_test',
'make MYSQL_TEST=mysql_copy_tests mysql_integration_test',
'make mariadb_test',
'make gp_test',
'make st_test',
'make TEST="pg_pgbackrest_backup_fetch_test" pg_integration_test'
]
# do not cancel all tests if one failed
fail-fast: false
steps:
- name: Install deps
run: sudo apt-get install liblzo2-dev
- name: Check out code into the Go module directory
uses: actions/checkout@v3
- name: Set up Go 1.x
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
id: go
- name: Get dependencies
run: |
go get -v -t -d ./...
if [ -f Gopkg.toml ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
fi
# load docker images
- name: Load docker images
id: cache-images
uses: actions/cache@v3
with:
path: |
${{ env.CACHE_FILE_DOCKER_PREFIX }}
${{ env.CACHE_FILE_UBUNTU }}
${{ env.CACHE_FILE_GOLANG }}
key: ${{ env.IMAGES_CACHE_KEY }}
- name: Fail if no cached images
if: steps.cache-images.outputs.cache-hit != 'true'
run: |
echo "Failed to fetch cached docker images. Will now exit..."
exit 1
- name: Run test
run: ${{ matrix.command }}
env:
USE_BROTLI: 1
USE_LIBSODIUM: 1
USE_LZO: 1