mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-09 12:17:13 +00:00
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>
127 lines
3.5 KiB
YAML
127 lines
3.5 KiB
YAML
name: "📦 Test: Deploy (workstation)"
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
distros:
|
|
description: "Space-separated distro list"
|
|
required: true
|
|
type: string
|
|
whitelist:
|
|
description: "Optional space-separated whitelist of app ids"
|
|
required: false
|
|
type: string
|
|
default: ""
|
|
|
|
permissions:
|
|
contents: read
|
|
packages: read
|
|
|
|
env:
|
|
TEST_DEPLOY_TYPE: workstation
|
|
DISTROS: ${{ inputs.distros }}
|
|
NIX_CONFIG: |
|
|
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
|
|
INFINITO_IMAGE_TAG: ci-${{ github.sha }}
|
|
INFINITO_GHCR_MIRROR_PREFIX: mirror
|
|
PLAYWRIGHT_KEEP_ALL: ${{ vars.PLAYWRIGHT_KEEP_ALL }}
|
|
jobs:
|
|
discover:
|
|
name: 🖥️ Discover apps
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 60
|
|
outputs:
|
|
apps: ${{ steps.discover.outputs.apps }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Resolve repository owner
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
echo "GITHUB_REPOSITORY_OWNER=$(scripts/meta/resolve/repository/owner.sh)" >> "$GITHUB_ENV"
|
|
|
|
- name: Install jq
|
|
shell: bash
|
|
run: ./scripts/install/apt.sh jq
|
|
|
|
- name: Start stack for discovery
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
make up
|
|
|
|
- name: Resolve effective whitelist (diff vs origin/main)
|
|
id: resolve_wl
|
|
shell: bash
|
|
env:
|
|
INPUT_WHITELIST: ${{ inputs.whitelist }}
|
|
run: ./scripts/github/resolve_effective_whitelist.sh
|
|
|
|
- name: Discover apps
|
|
id: discover
|
|
shell: bash
|
|
env:
|
|
WHITELIST: ${{ steps.resolve_wl.outputs.whitelist }}
|
|
run: ./scripts/github/output_apps.sh
|
|
|
|
workstation:
|
|
name: 🖥️ Deploy ${{ matrix.apps }}
|
|
if: needs.discover.outputs.apps != '' && needs.discover.outputs.apps != '[]'
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 360
|
|
needs: discover
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
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: Resolve repository owner
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
echo "GITHUB_REPOSITORY_OWNER=$(scripts/meta/resolve/repository/owner.sh)" >> "$GITHUB_ENV"
|
|
|
|
- name: Install jq
|
|
shell: bash
|
|
run: ./scripts/install/apt.sh jq
|
|
|
|
- name: Deploy app
|
|
shell: bash
|
|
env:
|
|
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 }})"
|