Skip to content

Commit 32e5def

Browse files
committed
CI: split the BATS tests into a separate job
The BATS tests should not be associated with `test-misc.yaml`. Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
1 parent b562d97 commit 32e5def

File tree

1 file changed

+32
-8
lines changed

1 file changed

+32
-8
lines changed

.github/workflows/test.yml

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -301,11 +301,6 @@ jobs:
301301
- ../hack/test-templates/test-misc.yaml # TODO: merge net-user-v2 into test-misc
302302
steps:
303303
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
304-
with:
305-
# BATS tests don't expect lima version warnings like:
306-
# msg="treating lima version \"ea336ae\" from \"/Users/runner/.lima-bats/dummy/lima-version\" as very latest release"
307-
fetch-depth: 0
308-
submodules: true
309304
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
310305
with:
311306
go-version: 1.25.x
@@ -324,9 +319,6 @@ jobs:
324319
sudo modprobe kvm
325320
# `sudo usermod -aG kvm $(whoami)` does not take an effect on GHA
326321
sudo chown $(whoami) /dev/kvm
327-
- name: "Run BATS integration tests"
328-
run: make bats
329-
if: matrix.template == '../hack/test-templates/test-misc.yaml'
330322
- name: Install ansible-playbook
331323
run: |
332324
sudo apt-get install -y --no-install-recommends ansible
@@ -347,6 +339,38 @@ jobs:
347339
- name: "Show cache"
348340
run: ./hack/debug-cache.sh
349341

342+
bats:
343+
name: "Integration tests (BATS)"
344+
runs-on: ubuntu-24.04
345+
timeout-minutes: 30
346+
steps:
347+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
348+
with:
349+
# BATS tests don't expect lima version warnings like:
350+
# msg="treating lima version \"ea336ae\" from \"/Users/runner/.lima-bats/dummy/lima-version\" as very latest release"
351+
fetch-depth: 0
352+
submodules: true
353+
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
354+
with:
355+
go-version: 1.25.x
356+
- name: Make
357+
run: make
358+
- name: Install
359+
run: sudo make install
360+
- name: Install test dependencies
361+
run: |
362+
sudo apt-get update
363+
sudo apt-get install -y --no-install-recommends ovmf qemu-system-x86 qemu-utils w3m
364+
sudo modprobe kvm
365+
# `sudo usermod -aG kvm $(whoami)` does not take an effect on GHA
366+
sudo chown $(whoami) /dev/kvm
367+
- name: Cache image used by templates/default.yaml
368+
uses: ./.github/actions/setup_cache_for_template
369+
with:
370+
template: templates/default.yaml
371+
- name: "Run BATS integration tests"
372+
run: make bats
373+
350374
colima:
351375
name: "Colima tests (QEMU, Linux host)"
352376
runs-on: ubuntu-24.04

0 commit comments

Comments
 (0)