From 57fb4e84f3a0a631374ed0f1085aafc21b5364f0 Mon Sep 17 00:00:00 2001 From: Konstantin Pavlov Date: Tue, 2 Jul 2024 18:25:42 -0700 Subject: [PATCH] Unit-buildbot: added privileged tests job --- .github/workflows/unit-buildbot.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/unit-buildbot.yml b/.github/workflows/unit-buildbot.yml index 5b77abb..6112bc4 100644 --- a/.github/workflows/unit-buildbot.yml +++ b/.github/workflows/unit-buildbot.yml @@ -39,6 +39,7 @@ jobs: os: [ alpine-3.19, amazonlinux-2, amazonlinux-2023, debian-11, debian-12, fedora-39, freebsd-14, rhel-8, rhel-9, ubuntu-20.04, ubuntu-22.04, ubuntu-23.10 ] arch: [ amd64, arm64 ] njs: [ '' ] + user: [ '' ] exclude: - os: fedora-39 # we don't provide Fedora arm64 runners arch: arm64 @@ -50,6 +51,10 @@ jobs: - os: ubuntu-22.04 arch: amd64 njs: HEAD + include: + - os: ubuntu-22.04 + arch: amd64 + user: privileged fail-fast: false steps: @@ -254,13 +259,24 @@ jobs: sudo python3 -m pip install --upgrade pip python3 -m pip install -r /tmp/unit-requirements.txt - - name: Build and run tests + - name: Build tests run: | $MAKE_UTILITY -j$(nproc) tests + + - name: Run tests + if: ${{ matrix.user == '' }} + run: | ./build/tests ulimit -c unlimited python3 -m pytest test + - name: Run privileged tests + if: ${{ matrix.user == 'privileged' }} + run: | + sudo ./build/tests + ulimit -c unlimited + sudo python3 -m pytest test + print: runs-on: [ debian-12-amd64 ] needs: check-if-allowed