mirror of
https://github.com/mulgadc/spinifex.git
synced 2026-10-15 17:11:30 +00:00
9c9bb9430c
* test: gate scripts/images/ shell suites + shellcheck in CI The eks-node/rds-postgres *_test.sh suites and shellcheck only ever ran by hand: spinifex.yml filters pushes on Go-only paths and no job invoked them, so a broken helper could land unnoticed. Add a `make test-images` target and a path-filtered image-scripts.yml workflow so both run automatically on scripts/images/** and images/** changes, kept separate from preflight so image-asset churn doesn't run on every Go contributor's commit. Also clears the shellcheck findings that would have started this gate red (SC1090 on a runtime-resolved source path, SC2154 x2 on eval-assigned variables shellcheck can't trace). * test: pin vCPU quota gate ordering in RequestSpotInstances Nothing asserted that RequestSpotInstances runs the vCPU quota gate before dispatching capacity or launching a VM, so a regression that dropped or reordered EnforceLaunch would pass silently. Add an ordering test using a real quota.Service (embedded JetStream KV) and real NATS responders standing in for the capacity and launch daemons, recording a global call sequence and asserting the gate's index precedes both. Verified by removing the gate: the first quota-KV read then comes from the post-launch charge instead, landing after capacity dispatch and launch, and the ordering assertion fails as expected.
40 lines
892 B
YAML
40 lines
892 B
YAML
name: Image Scripts
|
|
|
|
# Separate from spinifex.yml on purpose: scripts/images/ and images/ are shell
|
|
# and mkosi assets baked into system images, not Go, so they get their own
|
|
# path-filtered gate instead of running on every Go contributor's push (see
|
|
# ui.yml for the same pattern applied to the frontend).
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- dev
|
|
paths:
|
|
- scripts/images/**
|
|
- images/**
|
|
- .github/workflows/image-scripts.yml
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
- dev
|
|
paths:
|
|
- scripts/images/**
|
|
- images/**
|
|
- .github/workflows/image-scripts.yml
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
image_scripts:
|
|
name: Image Scripts
|
|
runs-on: ubuntu-26.04
|
|
|
|
steps:
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v7
|
|
|
|
- name: Run image script tests + shellcheck
|
|
run: make test-images
|