-
Notifications
You must be signed in to change notification settings - Fork 16
104 lines (89 loc) · 3.5 KB
/
docker-tests-8.0.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
name: Docker tests (8.0)
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
GO_VERSION: 1.21.6
DOCKER_API_VERSION: 1.43
jobs:
buildimages:
name: Build images
runs-on: ubuntu-20.04
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Docker images caching
id: cache-images
uses: actions/cache@v3
with:
path: ~/mysync-base-img8.0.tgz
key: mysync-base-img8.0-${{ hashFiles('tests/images/base/*') }}
- name: Build images
if: steps.cache-images.outputs.cache-hit != 'true'
run: make base_img_8.0
- name: Export image
if: steps.cache-images.outputs.cache-hit != 'true'
run: docker save mysync-test-base8.0 | gzip -c > ~/mysync-base-img8.0.tgz
test:
name: test
runs-on: ubuntu-20.04
needs: [ buildimages ]
strategy:
matrix:
command:
- 'VERSION=8.0 GODOG_FEATURE=active_nodes.feature make test'
- 'VERSION=8.0 GODOG_FEATURE=async.feature make test'
- 'VERSION=8.0 GODOG_FEATURE=cascade_replicas.feature make test'
- 'VERSION=8.0 GODOG_FEATURE=CLI.feature make test'
- 'VERSION=8.0 GODOG_FEATURE=crash_recovery.feature make test'
- 'VERSION=8.0 GODOG_FEATURE=events_reenable.feature make test'
- 'VERSION=8.0 GODOG_FEATURE=external_replication.feature make test'
- 'VERSION=8.0 GODOG_FEATURE=failover.feature make test'
- 'VERSION=8.0 GODOG_FEATURE=free_space.feature make test'
- 'VERSION=8.0 GODOG_FEATURE=host_discovery.feature make test'
- 'VERSION=8.0 GODOG_FEATURE=host_management.feature make test'
- 'VERSION=8.0 GODOG_FEATURE=maintenance.feature make test'
- 'VERSION=8.0 GODOG_FEATURE=offline_mode.feature make test'
- 'VERSION=8.0 GODOG_FEATURE=priority.feature make test'
- 'VERSION=8.0 GODOG_FEATURE=readonly_filesystem.feature make test'
- 'VERSION=8.0 GODOG_FEATURE=recovery.feature make test'
- 'VERSION=8.0 GODOG_FEATURE=repair.feature make test'
- 'VERSION=8.0 GODOG_FEATURE=statefile.feature make test'
- 'VERSION=8.0 GODOG_FEATURE=switchover_from.feature make test'
- 'VERSION=8.0 GODOG_FEATURE=switchover_to.feature make test'
- 'VERSION=8.0 GODOG_FEATURE=zk_failure.feature make test'
- 'VERSION=8.0 GODOG_FEATURE=zk_maintenance.feature make test'
fail-fast: false
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Get dependencies
run: |
go get -v -t -d ./...
- name: Load docker images
id: cache-images
uses: actions/cache@v3
with:
path: ~/mysync-base-img8.0.tgz
key: mysync-base-img8.0-${{ hashFiles('tests/images/base/*') }}
- 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: Import image
run: docker load -i ~/mysync-base-img8.0.tgz
- name: Run test
run: ${{ matrix.command }}
- uses: actions/upload-artifact@v4
if: failure()
with:
name: logs
path: tests/logs