Run framework CI on dedicated isolated ABSDEV runner
ABSDEV Framework CI / framework-ci (push) Successful in 23s
ABSDEV Framework CI / framework-ci (push) Successful in 23s
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user