From 74189c1e1473ea7b3fff0a574d6b1cb28439fdfe Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Wed, 10 Dec 2025 18:37:29 +0100 Subject: [PATCH] Add virgin Nix flake E2E workflow and update .gitignore - Introduce `test-nix-flake-e2e.yml` workflow to run a full Arch-based virgin environment test with Nix flakes enabled and shared Docker caches - Ensure pkgmgr self-installation and flake-based installer path are exercised - Update .gitignore with additional build artifacts, Debian packaging files, and pkgmgr output directories --- .github/workflows/test-nix-flake-e2e.yml | 66 ++++++++++++++++++++++++ .gitignore | 21 ++++---- 2 files changed, 76 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/test-nix-flake-e2e.yml diff --git a/.github/workflows/test-nix-flake-e2e.yml b/.github/workflows/test-nix-flake-e2e.yml new file mode 100644 index 0000000..adec740 --- /dev/null +++ b/.github/workflows/test-nix-flake-e2e.yml @@ -0,0 +1,66 @@ +name: Test Virgin + +on: + push: + branches: + - main + - master + - develop + - "*" + pull_request: + +jobs: + test-virgin: + 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 + run: | + set -euo pipefail + + echo ">>> Starting virgin ArchLinux container test (with shared caches)..." + + docker run --rm \ + -v "$PWD":/src \ + -v pkgmgr_nix_store:/nix \ + -v pkgmgr_nix_cache:/root/.cache/nix \ + -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 version pkgmgr + + echo ">>> Virgin Arch test completed successfully." + ' diff --git a/.gitignore b/.gitignore index 1bc514a..ac557f6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,6 @@ # Prevents unwanted files from being committed to version control. -# Custom Config file -config/config.yaml - # Python bytecode __pycache__/ *.pyc @@ -17,6 +14,16 @@ venv/ dist/ build/* *.egg-info/ +pkg + +package-manager-* + +# debian +debian/package-manager/ +debian/debhelper-build-stamp +debian/files +debian/.debhelper/ +debian/package-manager.substvars # Editor files .vscode/ @@ -31,11 +38,3 @@ Thumbs.db # Ignore logs *.log -package-manager-* - -# debian -debian/package-manager/ -debian/debhelper-build-stamp -debian/files -debian/.debhelper/ -debian/package-manager.substvars \ No newline at end of file