Skip to content

Commit 2a61bab

Browse files
authored
Merge pull request #6 from AkihiroSuda/ci
CI: add cgroup v1 (AlmaLinux 8)
2 parents 03beff6 + be971b9 commit 2a61bab

File tree

1 file changed

+33
-4
lines changed

1 file changed

+33
-4
lines changed

.github/workflows/test.yml

+33-4
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ permissions:
1111
contents: read
1212

1313
jobs:
14-
unit:
14+
cgroup-v2:
15+
name: "cgroup v2 (Ubuntu 24.04)"
1516
timeout-minutes: 10
1617
strategy:
1718
fail-fast: false
1819
matrix:
19-
os: [ubuntu-24.04]
2020
go-version: [1.23.x, 1.24.x]
2121
race: ["-race", ""]
22-
runs-on: ${{ matrix.os }}
22+
runs-on: ubuntu-24.04
2323

2424
steps:
2525
- uses: actions/checkout@v4
@@ -28,9 +28,38 @@ jobs:
2828
go-version: ${{ matrix.go-version }}
2929
- run: go test -timeout 3m ${{ matrix.race }} -v ./...
3030

31+
cgroup-v1:
32+
name: "cgroup v1 (AlmaLinux 8)"
33+
timeout-minutes: 20
34+
runs-on: ubuntu-24.04
35+
steps:
36+
- uses: actions/checkout@v4
37+
38+
- uses: lima-vm/lima-actions/setup@v1
39+
id: lima-actions-setup
40+
41+
- uses: actions/cache@v4
42+
with:
43+
path: ~/.cache/lima
44+
key: lima-${{ steps.lima-actions-setup.outputs.version }}
45+
46+
- name: "Start VM"
47+
# --plain is set to disable file sharing, port forwarding, built-in containerd, etc. for faster start up
48+
run: limactl start --plain --name=default template://almalinux-8
49+
50+
- name: "Initialize VM"
51+
run: |
52+
set -eux -o pipefail
53+
limactl cp -r . default:/tmp/cgroups
54+
lima sudo dnf install -y golang
55+
56+
- name: "Run unit tests"
57+
run: LIMA_WORKDIR=/tmp/cgroups lima sudo GOTOOLCHAIN=auto go test -v ./...
58+
3159
all-done:
3260
needs:
33-
- unit
61+
- cgroup-v2
62+
- cgroup-v1
3463
runs-on: ubuntu-24.04
3564
steps:
3665
- run: echo "All jobs completed"

0 commit comments

Comments
 (0)