Drop the container pipeline: the servers run the flake
All checks were successful
CI / test (push) Successful in 10m5s
All checks were successful
CI / test (push) Successful in 10m5s
asxpio-services runs the site and the monitor worker from this flake (services.asxpio) and the containers are gone. The Dockerfile, .dockerignore, docker-compose.yml and the Kaniko and deploy jobs go; CI runs the tests and builds the package on every push, main included. CLAUDE.md describes the new setup: storage on ops over the private network, settings and secrets in iac's sops, no deploy secrets here. Assisted-by: Claude:opus-5-5
This commit is contained in:
parent
4c0b6c3eef
commit
4927d2fec8
1 changed files with 35 additions and 384 deletions
|
|
@ -1,70 +0,0 @@
|
|||
name: Tests
|
||||
|
||||
# main is covered by the test job inside deploy.yaml (which gates the build);
|
||||
# this workflow covers every other branch.
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: nix-latest
|
||||
# Settings via env, not /etc/nix/nix.conf: in the image that is a
|
||||
# symlink into /nix/store, which the runner's nix-store volume
|
||||
# shadows, so it dangles once the image moves on.
|
||||
env:
|
||||
NIX_CONFIG: |
|
||||
experimental-features = nix-command flakes
|
||||
build-users-group =
|
||||
sandbox = false
|
||||
services:
|
||||
# CI stand-in for bin/test's ephemeral Postgres: the nix container runs
|
||||
# as root and initdb refuses to run as root, so the DB lives in a
|
||||
# service container instead and the suite connects via TEST_DATABASE_URL.
|
||||
# Job and service share the per-workflow bridge network (the runner's
|
||||
# container.network must stay "" — with "host" the service network is
|
||||
# never created and services fail to start).
|
||||
postgres:
|
||||
image: postgres:18.7-alpine
|
||||
env:
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_HOST_AUTH_METHOD: trust
|
||||
POSTGRES_DB: asxpio_test
|
||||
steps:
|
||||
- name: Prepare container for actions
|
||||
run: |
|
||||
# node for JS actions (checkout); git-minimal is already in the image
|
||||
nix-env -iA nixpkgs.nodejs_22
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v7.0.1
|
||||
|
||||
# The nix closure persists in the runner's nix-store volume; gems live
|
||||
# in the workspace (.gems via the flake's BUNDLE_PATH), so cache those.
|
||||
- name: Cache gems
|
||||
uses: actions/cache@v6.1.0
|
||||
with:
|
||||
path: .gems
|
||||
key: gems-${{ hashFiles('Gemfile.lock') }}
|
||||
|
||||
- name: Wait for Postgres
|
||||
run: |
|
||||
for i in $(seq 1 30); do
|
||||
nix develop -c pg_isready -h postgres -U postgres && exit 0
|
||||
sleep 2
|
||||
done
|
||||
echo "Postgres service never became ready" >&2
|
||||
exit 1
|
||||
|
||||
- name: Run test suite
|
||||
env:
|
||||
TEST_DATABASE_URL: postgres://postgres@postgres:5432/asxpio_test
|
||||
run: nix develop -c bundle exec rake test
|
||||
|
||||
# What the servers run: gemset.nix in step with Gemfile.lock, and
|
||||
# the package builds
|
||||
- name: Package
|
||||
run: |
|
||||
nix develop -c ruby bin/check-gemset
|
||||
nix build .#default
|
||||
Loading…
Reference in a new issue