Files
computer-playbook/.github/workflows/test-environment.yml
T
kevinveenbirkenbachandClaude Sonnet 4.6 721e599428 refactor(scripts): rename development.sh to environment.sh
Aligns the script name with the workflow and its purpose.
Updates all references in test-environment.yml and setup.md.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 12:42:02 +02:00

64 lines
1.9 KiB
YAML

name: Test Development Environment
on:
workflow_dispatch:
workflow_call:
permissions:
contents: read
packages: read
jobs:
test-environment:
name: 🧑‍💻 Test Environment (${{ matrix.dev_runtime_image }})
runs-on: ubuntu-latest
timeout-minutes: 180
strategy:
fail-fast: false
matrix:
dev_runtime_image:
- manjarolinux/base
- debian:bookworm
- ubuntu:latest
- fedora:latest
- quay.io/centos/centos:latest
env:
DEV_RUNTIME_IMAGE: ${{ matrix.dev_runtime_image }}
NIX_CONFIG: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Run dev environment routine
shell: bash
run: |
set -euo pipefail
HOST_WORKDIR="$(pwd -P)"
# Build the development image in this job and avoid pulling mutable GHCR tags.
# Keep the same absolute path inside the container as on the host.
# This is required because docker compose talks to the host daemon via /var/run/docker.sock.
docker run --rm \
-e GITHUB_ACTIONS=true \
-e GITHUB_REPOSITORY="${{ github.repository }}" \
-e GITHUB_REPOSITORY_OWNER="${{ github.repository_owner }}" \
-e GITHUB_SHA="${{ github.sha }}" \
-e INFINITO_DISTRO=debian \
-e INFINITO_IMAGE=infinito-debian \
-e INFINITO_PULL_POLICY=never \
-e INFINITO_NO_BUILD=0 \
-e NIX_CONFIG \
--network host \
-v "${HOST_WORKDIR}:${HOST_WORKDIR}" \
-v "/mnt/docker:/var/lib/docker" \
-v "/var/run/docker.sock:/var/run/docker.sock" \
-w "${HOST_WORKDIR}" \
"${DEV_RUNTIME_IMAGE}" \
bash -lc '
bash ./scripts/tests/environment.sh
'