From 3917ea6273d295b972d6fb155d2f2ada449736bb Mon Sep 17 00:00:00 2001 From: Mark Gregory Date: Thu, 26 Nov 2026 15:09:14 +0000 Subject: [PATCH] Run framework CI on dedicated isolated ABSDEV runner --- .gitea/workflows/framework-ci.yaml | 80 +++++++++++++++++++++++++----- 1 file changed, 67 insertions(+), 13 deletions(-) diff --git a/.gitea/workflows/framework-ci.yaml b/.gitea/workflows/framework-ci.yaml index 525bb1b..94c4bcc 100644 --- a/.gitea/workflows/framework-ci.yaml +++ b/.gitea/workflows/framework-ci.yaml @@ -2,28 +2,82 @@ name: ABSDEV Framework CI on: push: + branches: + - main pull_request: workflow_dispatch: jobs: - framework-validation: - runs-on: ubuntu-latest - - timeout-minutes: 10 + framework-ci: + runs-on: absdev-ci + timeout-minutes: 15 env: - PYTHONDONTWRITEBYTECODE: "1" - PYTHONUNBUFFERED: "1" ABSDEV_INTEGRATION_TESTS: "0" + PYTHONDONTWRITEBYTECODE: "1" steps: - - name: Checkout framework - uses: actions/checkout@v4 - with: - persist-credentials: false + - name: Verify job isolation + run: | + set -eu - - name: Verify Python availability - run: python3 --version + test ! -e /var/run/docker.sock + test ! -e /run/docker.sock + test ! -e /data/.runner - - name: Run framework validation + test "$(cat /sys/class/net/eth0/mtu)" = "1400" + + grep -E '^NoNewPrivs:[[:space:]]+1$' /proc/self/status + + python3 --version + git --version + + python3 -B -c ' + import sys + assert sys.version_info[:2] == (3, 14) + print("PASS: Python 3.14") + ' + + echo "PASS: Job isolation checks" + + - name: Checkout exact revision + env: + CI_TOKEN: ${{ github.token }} + CI_SERVER: ${{ github.server_url }} + CI_REPOSITORY: ${{ github.repository }} + CI_REVISION: ${{ github.sha }} + run: | + set -eu + umask 077 + + test "$CI_SERVER" = "https://git.absdev.net" + test "$CI_REPOSITORY" = "mag/absdev-deployment" + test -n "$CI_TOKEN" + + printf '%s\n' "$CI_REVISION" | + grep -Eq '^[a-f0-9]{40}$' + + git init + + git remote add origin \ + "$CI_SERVER/$CI_REPOSITORY.git" + + AUTH=$(printf 'x-access-token:%s' "$CI_TOKEN" | + base64 -w0) + + GIT_CONFIG_COUNT=1 \ + GIT_CONFIG_KEY_0=http.extraHeader \ + GIT_CONFIG_VALUE_0="Authorization: Basic $AUTH" \ + GIT_TERMINAL_PROMPT=0 \ + git fetch --no-tags --depth=1 origin "$CI_REVISION" + + unset AUTH CI_TOKEN + + git checkout --detach FETCH_HEAD + + test "$(git rev-parse HEAD)" = "$CI_REVISION" + + echo "PASS: Exact source revision checked out" + + - name: Execute framework CI run: bash scripts/ci-check.sh