Files
computer-playbook/.github/workflows/test-deploy-local.yml
T
kevinveenbirkenbachandClaude Opus 4.7 14700e0658 feat(test-e2e-playwright): add PLAYWRIGHT_KEEP_ALL artefact-retention toggle
Forwards `PLAYWRIGHT_KEEP_ALL` from host env / GitHub Actions repo var
through `TEST_E2E_PLAYWRIGHT_KEEP_ALL` (inventory-overridable) into the
container and flips trace / screenshot / video to `on` for every test
when truthy.

SPOT for the propagation chain lives in
`docs/contributing/actions/testing/playwright.md#artefact-retention-`;
CI Configuration and the agent iteration loops link to it.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-10 22:06:31 +02:00

131 lines
3.8 KiB
YAML

name: "📦 Test: Deploy (local)"
on:
workflow_dispatch:
inputs:
test_deploy_type:
description: "server | universal | workstation"
required: false
default: "server"
type: string
distros:
description: "Space-separated distro list"
required: false
default: "debian"
type: string
whitelist:
description: "Optional space-separated whitelist of app ids"
required: false
type: string
default: ""
permissions:
contents: read
packages: read
# IMPORTANT:
# - For local `act`, prefer overriding via `--env`.
# - For GitHub UI dispatch, inputs are used as fallback.
env:
TEST_DEPLOY_TYPE: "server"
DISTROS: "debian"
NIX_CONFIG: ""
INFINITO_IMAGE_TAG: "latest"
PLAYWRIGHT_KEEP_ALL: ${{ vars.PLAYWRIGHT_KEEP_ALL }}
jobs:
discover:
name: 🔎 Discover apps (local)
runs-on: ubuntu-latest
timeout-minutes: 60
outputs:
apps: ${{ steps.discover.outputs.apps }}
test_deploy_type: ${{ steps.vars.outputs.test_deploy_type }}
distros: ${{ steps.vars.outputs.distros }}
whitelist: ${{ steps.vars.outputs.whitelist }}
steps:
- uses: actions/checkout@v6
- name: Resolve effective inputs/env
id: vars
shell: bash
env:
INPUT_TEST_DEPLOY_TYPE: ${{ inputs.test_deploy_type }}
INPUT_DISTROS: ${{ inputs.distros }}
INPUT_WHITELIST: ${{ inputs.whitelist }}
run: |
set -euo pipefail
scripts/meta/resolve/input.sh
- name: Install deps (jq + envsubst)
shell: bash
run: ./scripts/install/apt.sh jq gettext-base
- name: Start stack for discovery
shell: bash
run: |
set -euo pipefail
make up
- name: Discover apps
id: discover
shell: bash
env:
WHITELIST: ${{ inputs.whitelist }}
run: ./scripts/github/output_apps.sh
deploy:
name: 🚀 Deploy ${{ needs.discover.outputs.test_deploy_type }} app (${{ matrix.apps }})
if: needs.discover.outputs.apps != '' && needs.discover.outputs.apps != '[]'
runs-on: ubuntu-latest
timeout-minutes: 360
needs: discover
strategy:
fail-fast: false
max-parallel: 1 # immer linear
matrix:
apps: ${{ fromJson(needs.discover.outputs.apps) }}
steps:
# Reclaim runner space before Docker pulls start. Deploy jobs otherwise
# compete with the default Ubuntu image payload for limited root space.
# Option rationale: docs/contributing/artefact/files/github/workflow.md
- name: Free disk space
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
with:
tool-cache: true
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true
- uses: actions/checkout@v6
# Replace the default ~4 GB runner swap with a larger file so transient
# memory spikes (e.g. peertube plugin install, issue #162) don't trip
# the host OOM-killer. Script picks / or /mnt based on live free space.
- name: Enlarge swap space
shell: bash
run: ./scripts/github/enlarge_swap.sh
- name: Install deps (jq + envsubst)
shell: bash
run: ./scripts/install/apt.sh jq gettext-base
- name: Deploy app (same as CI logic)
shell: bash
env:
TEST_DEPLOY_TYPE: ${{ needs.discover.outputs.test_deploy_type }}
DISTROS: ${{ needs.discover.outputs.distros }}
APPS: ${{ matrix.apps }}
run: ./scripts/tests/deploy/ci/all.sh
- name: Dump runner state (on failure)
if: failure()
shell: bash
run: ./scripts/github/dump_runner_state.sh "post-deploy failure (${{ matrix.apps }})"