Skip to content

Commit 6de9828

Browse files
authored
Merge pull request #221 from AkihiroSuda/vm
CI: add AlmaLinux 8, CentOS Stream 9, and Fedora
2 parents c79bd28 + af36dd6 commit 6de9828

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/validate.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,41 @@ jobs:
9090

9191
- name: test
9292
run: make TESTFLAGS="${{ matrix.race }}" test
93+
94+
vm:
95+
name: "VM"
96+
strategy:
97+
fail-fast: false
98+
matrix:
99+
template:
100+
- template://almalinux-8
101+
- template://centos-stream-9
102+
- template://fedora
103+
runs-on: ubuntu-24.04
104+
steps:
105+
- uses: actions/checkout@v4
106+
107+
- name: "Install Lima"
108+
uses: lima-vm/lima-actions/setup@v1
109+
id: lima-actions-setup
110+
111+
- name: "Cache ~/.cache/lima"
112+
uses: actions/cache@v4
113+
with:
114+
path: ~/.cache/lima
115+
key: lima-${{ steps.lima-actions-setup.outputs.version }}-${{ matrix.template }}
116+
117+
- name: "Start VM"
118+
# --plain is set to disable file sharing, port forwarding, built-in containerd, etc. for faster start up
119+
run: limactl start --plain --name=default ${{ matrix.template }}
120+
121+
- name: "Initialize VM"
122+
run: |
123+
set -eux -o pipefail
124+
# Sync the current directory to /tmp/selinux in the guest
125+
limactl cp -r . default:/tmp/selinux
126+
# Install packages
127+
lima sudo dnf install -y git make golang
128+
129+
- name: "make test"
130+
run: lima make -C /tmp/selinux test

0 commit comments

Comments
 (0)