From 6c8aaaaded8c06617d87970540e285524a71d1b2 Mon Sep 17 00:00:00 2001 From: ccoVeille <3875889+ccoVeille@users.noreply.github.com> Date: Sun, 8 Sep 2024 16:08:58 +0200 Subject: [PATCH] golangci: try to set up golangci The ebpf libraries are not helping at all. --- .github/workflows/tests.yaml | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 1e68185..ac766b1 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -47,6 +47,32 @@ jobs: name: unit-test path: /tmp/unit/ + linting: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # ratchet:actions/checkout@v3 + + - name: Set up Go + uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # ratchet:actions/setup-go@v4 + with: + go-version: '1.21' + + - name: Install Dependencies + run: | + sudo apt update + sudo apt install -y clang + sudo apt install -y libbpf-dev + sudo apt install -y libseccomp-dev + + - name: Build coverage-instrumented binary + run: | + make build-static-libbpfgo + make build-bpf + + - name: Golangci-lint + uses: golangci/golangci-lint-action@v6.1.0 + args: internal/analyzer internal/archiver internal/elfreader internal/embeddable internal/executor internal/metadata harpoon/internal/privileged internal/seccomputils internal/writer + integration-test: runs-on: ubuntu-latest @@ -76,7 +102,7 @@ jobs: mkdir -p /tmp/integration # we have to run integration tests one-by-one # otherwhise they will run in parallel. - # since harpoon apply network forwards, these could + # since harpoon apply network forwards, these could # interact with each other and make the test fail. go test \ -exec sudo \