Skip to content

Commit 8ad93b2

Browse files
authored
Merge pull request #2629 from baconYao/refactor-test-plans
tests: Optimize CI test matrix to reduce workflow duration
2 parents d29ca4f + 86f5f47 commit 8ad93b2

File tree

7 files changed

+243
-197
lines changed

7 files changed

+243
-197
lines changed

.github/workflows/tests.yml

Lines changed: 53 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -130,62 +130,72 @@ jobs:
130130
fail-fast: false
131131
matrix:
132132
go:
133+
- oldstable
133134
- stable
135+
- tip
134136
suite:
135137
- cluster
136-
- standalone
138+
- standalone_core
139+
- standalone_container
140+
- standalone_network
141+
- standalone_storage
137142
backend:
138143
- dir
139-
- btrfs
140-
- lvm
141-
- zfs
142-
- ceph
143-
- linstor
144-
- random
145144
os:
146145
- ubuntu-24.04
146+
- ubuntu-24.04-arm
147147
include:
148-
- go: oldstable
148+
# Run standalone storage tests on all storage drivers but only on Ubuntu 24.04 with stable Go
149+
- os: ubuntu-24.04
150+
backend: btrfs
151+
go: stable
152+
suite: standalone_storage
153+
- os: ubuntu-24.04
154+
backend: ceph
155+
go: stable
156+
suite: standalone_storage
157+
- os: ubuntu-24.04
158+
backend: linstor
159+
go: stable
160+
suite: standalone_storage
161+
- os: ubuntu-24.04
162+
backend: lvm
163+
go: stable
164+
suite: standalone_storage
165+
- os: ubuntu-24.04
166+
backend: random
167+
go: stable
168+
suite: standalone_storage
169+
- os: ubuntu-24.04
170+
backend: zfs
171+
go: stable
172+
suite: standalone_storage
173+
174+
# Run cluster tests on all storage drivers but only on Ubuntu 24.04 with stable Go
175+
- os: ubuntu-24.04
176+
backend: btrfs
177+
go: stable
178+
suite: cluster
179+
- os: ubuntu-24.04
180+
backend: ceph
181+
go: stable
149182
suite: cluster
150-
backend: dir
151-
os: ubuntu-24.04
152-
- go: oldstable
153-
suite: standalone
154-
backend: dir
155-
os: ubuntu-24.04
156-
- go: tip
183+
- os: ubuntu-24.04
184+
backend: linstor
185+
go: stable
157186
suite: cluster
158-
backend: dir
159-
os: ubuntu-24.04
160-
- go: tip
161-
suite: standalone
162-
backend: dir
163-
os: ubuntu-24.04
164-
165-
- go: oldstable
187+
- os: ubuntu-24.04
188+
backend: lvm
189+
go: stable
166190
suite: cluster
167-
backend: dir
168-
os: ubuntu-24.04-arm
169-
- go: oldstable
170-
suite: standalone
171-
backend: dir
172-
os: ubuntu-24.04-arm
173-
- go: stable
191+
- os: ubuntu-24.04
192+
backend: random
193+
go: stable
174194
suite: cluster
175-
backend: dir
176-
os: ubuntu-24.04-arm
177-
- go: stable
178-
suite: standalone
179-
backend: dir
180-
os: ubuntu-24.04-arm
181-
- go: tip
195+
- os: ubuntu-24.04
196+
backend: zfs
197+
go: stable
182198
suite: cluster
183-
backend: dir
184-
os: ubuntu-24.04-arm
185-
- go: tip
186-
suite: standalone
187-
backend: dir
188-
os: ubuntu-24.04-arm
189199
runs-on: ${{ matrix.os }}
190200

191201
steps:

test/includes/setup.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
ensure_has_localhost_remote() {
44
# shellcheck disable=SC2039,3043
55
local addr="${1}"
6+
7+
incus remote remove localhost 2>/dev/null || true
68
if ! incus remote list | grep -q "localhost"; then
79
token="$(incus config trust add foo -q)"
810
incus remote add localhost "https://${addr}" --accept-certificate --token "${token}"

0 commit comments

Comments
 (0)