feat: add CI workflow and integration test stub
Some checks failed
Build and test NixOS config / build (pull_request) Has been cancelled
Some checks failed
Build and test NixOS config / build (pull_request) Has been cancelled
This commit is contained in:
28
tests/run-integration.sh
Executable file
28
tests/run-integration.sh
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env bash
|
||||
# Integration test suite for PR validation on staging VM
|
||||
#
|
||||
# This script runs inside the staging VM after the PR's NixOS config
|
||||
# has been deployed. It tests that all services come up correctly.
|
||||
#
|
||||
# Usage: pr-test-vm ssh < tests/run-integration.sh
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
echo "==> Integration tests starting..."
|
||||
|
||||
# Test Docker is running
|
||||
echo " [1/3] Docker daemon..."
|
||||
docker info > /dev/null 2>&1 || { echo "FAIL: Docker not running"; exit 1; }
|
||||
echo " OK"
|
||||
|
||||
# Test compose stack can start
|
||||
echo " [2/3] Docker Compose stack..."
|
||||
docker compose -f /opt/data/compose.yml ps > /dev/null 2>&1 || { echo "FAIL: Compose stack not running"; exit 1; }
|
||||
echo " OK"
|
||||
|
||||
# Test services are healthy
|
||||
echo " [3/3] Service health checks..."
|
||||
# TODO: add per-service health checks
|
||||
echo " OK (placeholder)"
|
||||
|
||||
echo "==> All integration tests passed."
|
||||
Reference in New Issue
Block a user