Skip to content

ci: fix fixture path in the .deb smoke-test #10

ci: fix fixture path in the .deb smoke-test

ci: fix fixture path in the .deb smoke-test #10

Workflow file for this run

# gitagotchi CI — the pet is a pure function of recorded API data, so the
# whole suite runs offline from generated fixtures (plan.md §9.1). The
# macOS leg exists because bash portability is a named risk (§12): macOS
# ships bash 3.2 and gh-pet hops to brew bash ≥ 4.
name: ci
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: install bash 4+ and jq (macOS ships bash 3.2)
if: runner.os == 'macOS'
run: brew install bash jq
- name: run the offline suite
run: gh-pet/tests/run.sh
# prove the apt path: build the .deb, install it for real, and drive the
# INSTALLED binary — this is what catches symlink/lib-resolution breakage
# (the kind that slipped through until `brew install` was run by hand).
deb:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: build the .deb
run: packaging/build-deb.sh 0.0.0-ci dist
- name: install it (resolves jq/curl deps)
run: sudo apt-get update -qq && sudo apt-get install -y ./dist/*.deb
- name: drive the installed gh-pet against fixtures
run: |
# make_fixtures.sh cd's into its own dir, so let it use its default
# location (gh-pet/tests/fixtures) rather than passing a path it
# would then re-root under tests/
gh-pet/tests/make_fixtures.sh >/dev/null
command -v gh-pet
gh-pet --version
out=$(gh-pet --fixtures gh-pet/tests/fixtures --snapshot --cozy)
grep -q happiness <<<"$out" || { echo "installed binary did not render"; exit 1; }
echo "installed .deb renders a pet ✓"