Skip to content

More CI work

More CI work #33

Workflow file for this run

# SPDX-License-Identifier: MIT
on:
push:
branches:
- cidev
workflow_dispatch:
env:
REPO_USERNAME: ${{ github.actor }}
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: read
jobs:
test-nixos:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: Checkout
uses: actions/checkout@main
- name: Install Nix
uses: nixbuild/nix-quick-install-action@master
with:
nix_conf: |
experimental-features = nix-command flakes
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= cache.lix.systems:aBnZUw8zA7H35Cz2RyKFVs3H4PlGTLawyY5KRbvJR8o= nixbuild.net/CHEAKK-1:IvfuR1Ldmkef8pMcSuCl9N2jppEb8KpBzdoB8uKQdxE= nix-csi.cachix.org-1:i4w33gR4efO67jpz8U7g/MdvRQ6mQ3LEF9fB8tES60g=
# builders = ssh-ng://eu.nixbuild.net aarch64-linux ; ssh-ng://eu.nixbuild.net x86_64-linux
substituters = https://cache.nixos.org?priority=1 https://nix-csi.cachix.org?priority=2 https://cache.lix.systems?priority=3 ssh-ng://eu.nixbuild.net?priority=4
sandbox = relaxed
- name: Configure SSH Keys
shell: bash
run: |
echo "${{ secrets.NIXBUILD_KEY }}" | install -D -m 600 /dev/stdin ~/.ssh/nixbuild_key
install -m 644 "${{ github.workspace }}/.github/assets/ssh-config" ~/.ssh/config
- name: Build nixos test driver
run: nix build --file . nixosTests.containerd.driverInteractive
- name: Start nixos test (background)
run: |
# The nixos-test-driver uses XDG_RUNTIME_DIR as its temp dir and
# propagates it to VM subprocesses automatically. GHA's default
# XDG_RUNTIME_DIR is /run/user/1001 (1.6 GB tmpfs) which fills up
# quickly — redirect to the root filesystem (87 GB free) instead.
mkdir -p /tmp/nixos-test-tmp
XDG_RUNTIME_DIR=/tmp/nixos-test-tmp ./result/bin/nixos-test-driver --no-interactive > /tmp/test.log 2>&1 &
echo $! > /tmp/test.pid
echo "Test running in background (PID: $(cat /tmp/test.pid))"
sleep 5
- name: Setup upterm session (test runs in parallel)
uses: owenthereal/action-upterm@v1
with:
wait-timeout-minutes: 5
limit-access-to-actor: true