From e2e64988b7a166b4b303011f33556ed082d6bf8d Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Wed, 16 Oct 2024 18:32:38 -0700 Subject: [PATCH] [test] ci: add actuated CI 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 --- .github/workflows/validate.yml | 59 ++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 40e3aa5..9d94922 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -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 @@ -101,6 +159,7 @@ jobs: - cross - test-stubs - test + - test-actuated runs-on: ubuntu-22.04 steps: - run: echo "All jobs completed"