From 298ed2a6c44cde90b4262b884169c53b8deda508 Mon Sep 17 00:00:00 2001 From: Michele Bertasi <405934+mbrt@users.noreply.github.com> Date: Thu, 26 Mar 2026 22:19:14 +0100 Subject: Add support for cgroup limits (#443) * Add cgroup package * Refactor procGgroup * Add testdata generation * Add v1 testdata generation * Move scripts around * Add integration test in CI * Remove cgroup v1 * Move to cgroup struct * Remove half-core test as it's redundant --- .github/workflows/ci.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to '.github') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e1975e0..973666c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -106,6 +106,26 @@ jobs: # make test # make test-teardown + test-cgroup-integration: + name: Test cgroup integration + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v2 + with: + go-version: '1.25' + - name: Build test binary + run: go test -c -o cgroup.test ./cgroup/ + - name: Run cgroup integration test + run: | + docker run --rm \ + --cpus=0.5 --memory=128m \ + -e CGROUP_EXPECTED_CPU_QUOTA=0.5 \ + -e CGROUP_EXPECTED_MEMORY_LIMIT=134217728 \ + -v "$PWD/cgroup.test":/cgroup.test:ro \ + debian:bookworm-slim \ + /cgroup.test -test.run TestIntegrationCgroupLimits -test.v + run-cli-tests: name: Run command-line interface tests runs-on: ubuntu-latest -- cgit v1.2.3