Files
computer-playbook/.github/workflows/test-deploy.yml
Kevin Veen-Birkenbach a31ef07718 Refactor CI workflows and fix timezone handling in containers
- Renamed test-cli.yml to test-code.yml and updated job name.
- Extended timeout for test-deploy workflow from 30 to 240 minutes.
- Skipped Ansible timezone configuration inside Docker/Podman/containerd to avoid write errors in CI.
- Added --skip-tests to the initial deploy step for improved CI stability.

Origin: https://chatgpt.com/share/69301c58-6628-800f-9e3a-f026c01b6e17
2025-12-03 12:17:59 +01:00

82 lines
2.5 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name: Build & Test Infinito.Nexus CLI in Docker Container
on:
push:
branches:
- master
pull_request:
jobs:
test-deploy:
runs-on: ubuntu-latest
timeout-minutes: 240
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Build Docker image
run: |
docker build --network=host --pull -t infinito:latest .
# 1) First deploy: normal + debug
- name: First deploy (normal + debug)
run: |
docker run --network=host --rm \
infinito:latest \
/bin/sh -lc '
set -e
cd /opt/infinito-src
# Create inventory (also creates inventories/github-ci/.password if missing)
infinito create inventory inventories/github-ci \
--host localhost \
--ssl-disabled
INVENTORY_PATH="inventories/github-ci/servers.yml"
VAULT_FILE="inventories/github-ci/.password"
# First deploy with debug
infinito deploy "$INVENTORY_PATH" -T server -p "$VAULT_FILE" --debug --skip-tests
'
# 2) Second deploy: reset + debug
- name: Second deploy (--reset --debug)
run: |
docker run --network=host --rm \
infinito:latest \
/bin/sh -lc '
set -e
cd /opt/infinito-src
# Rebuild inventory; .password will be reused if present
infinito create inventory inventories/github-ci \
--host localhost \
--ssl-disabled
INVENTORY_PATH="inventories/github-ci/servers.yml"
VAULT_FILE="inventories/github-ci/.password"
infinito deploy "$INVENTORY_PATH" -T server -p "$VAULT_FILE" --skip-tests --reset --debug
'
# 3) Third deploy: async (no debug)
- name: Third deploy (async deploy no debug)
run: |
docker run --network=host --rm \
infinito:latest \
/bin/sh -lc '
set -e
cd /opt/infinito-src
infinito create inventory inventories/github-ci \
--host localhost \
--ssl-disabled
INVENTORY_PATH="inventories/github-ci/servers.yml"
VAULT_FILE="inventories/github-ci/.password"
# Async-style deploy: no --debug, so some processes run in parallel
infinito deploy "$INVENTORY_PATH" -T server -p "$VAULT_FILE" --skip-tests
'