- convert all test workflows to reusable workflow_call - add central CI workflow for branches and PRs - add mark-stable workflow triggered on main pushes - ensure stable tag updates only after all tests succeed - remove duplicated triggers from test workflows ` https://chatgpt.com/share/693aa4a6-7460-800f-ba47-cfc15b1b2236
59 lines
1.8 KiB
YAML
59 lines
1.8 KiB
YAML
name: Test Virgin Root
|
|
|
|
on:
|
|
workflow_call:
|
|
|
|
jobs:
|
|
test-virgin-root:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 45
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Show Docker version
|
|
run: docker version
|
|
|
|
- name: Virgin Arch pkgmgr flake test (root)
|
|
run: |
|
|
set -euo pipefail
|
|
|
|
echo ">>> Starting virgin ArchLinux container test (root, with shared caches)..."
|
|
|
|
docker run --rm \
|
|
-v "$PWD":/src \
|
|
-v pkgmgr_repos:/root/Repositories \
|
|
-v pkgmgr_pip_cache:/root/.cache/pip \
|
|
-w /src \
|
|
archlinux:latest \
|
|
bash -lc '
|
|
set -euo pipefail
|
|
|
|
echo ">>> Updating and upgrading Arch system..."
|
|
pacman -Syu --noconfirm git python python-pip nix >/dev/null
|
|
|
|
echo ">>> Creating isolated virtual environment for pkgmgr..."
|
|
python -m venv /tmp/pkgmgr-venv
|
|
|
|
echo ">>> Activating virtual environment..."
|
|
source /tmp/pkgmgr-venv/bin/activate
|
|
|
|
echo ">>> Upgrading pip (cached)..."
|
|
python -m pip install --upgrade pip >/dev/null
|
|
|
|
echo ">>> Installing pkgmgr from current source tree (cached pip)..."
|
|
python -m pip install /src >/dev/null
|
|
|
|
echo ">>> Enabling Nix experimental features..."
|
|
export NIX_CONFIG="experimental-features = nix-command flakes"
|
|
|
|
echo ">>> Running: pkgmgr update pkgmgr --clone-mode shallow --no-verification"
|
|
pkgmgr update pkgmgr --clone-mode shallow --no-verification
|
|
|
|
echo ">>> Running: pkgmgr version pkgmgr"
|
|
pkgmgr version pkgmgr
|
|
|
|
echo ">>> Virgin Arch (root) test completed successfully."
|
|
'
|