Skip to content

Commit

Permalink
[test] ci: add actuated CI
Browse files Browse the repository at this point in the history
Actuated runners have Ubuntu with SELinux configured, so we can actually
run the test cases here (most of which require SELinux enabled).

Signed-off-by: Kir Kolyshkin <[email protected]>
  • Loading branch information
kolyshkin committed Oct 17, 2024
1 parent f56d30b commit e2e6498
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,64 @@ jobs:
if: ${{ matrix.race }} == "" # -race is not supported on linux/386
run: make GOARCH=386 test

test-actuated:
runs-on: actuated-arm64-6cpu-8gb
steps:
# https://gist.github.com/alexellis/1f33e581c75e11e161fe613c46180771#file-metering-gha-md
# vmmeter start
- name: Prepare arkade
uses: alexellis/arkade-get@master
with:
crane: latest
print-summary: false

- name: Install vmmeter
run: |
crane export --platform linux/arm64 ghcr.io/openfaasltd/vmmeter:latest | sudo tar -xvf - -C /usr/local/bin
- name: Run vmmeter
uses: self-actuated/vmmeter-action@master
# vmmeter end

- uses: actions/checkout@v4

- name: enable selinux
run: |
sudo apt update
sudo apt install -y policycoreutils selinux-basics selinux-utils
sudo selinux-activate
#------------
sestatus
#------------
- name: host info
run: |
set -x
# Sync `set -x` outputs with command ouputs
exec 2>&1
# Version
uname -a
cat /etc/os-release
# SELinux
sestatus
- name: install Go
uses: actions/setup-go@v5
with:
go-version: 1.23.x

- name: build
run: make build

- name: test
run: make test

- name: test -race
run: make TESTFLAGS="-race" test

- name: test 32-bit
run: make GOARCH=arm test

all-done:
needs:
- commit
Expand All @@ -101,6 +159,7 @@ jobs:
- cross
- test-stubs
- test
- test-actuated
runs-on: ubuntu-22.04
steps:
- run: echo "All jobs completed"

0 comments on commit e2e6498

Please sign in to comment.