| 1 | name: Pet conformance |
| 2 | |
| 3 | on: |
| 4 | workflow_dispatch: |
| 5 | |
| 6 | permissions: |
| 7 | contents: read |
| 8 | |
| 9 | concurrency: |
| 10 | group: pet-${{ github.event.pull_request.number || github.ref }} |
| 11 | cancel-in-progress: true |
| 12 | |
| 13 | jobs: |
| 14 | portable: |
| 15 | runs-on: ubuntu-24.04 |
| 16 | timeout-minutes: 15 |
| 17 | steps: |
| 18 | - uses: actions/checkout@v7 |
| 19 | - uses: actions/setup-node@v7.1.0 |
| 20 | with: |
| 21 | node-version: '22' |
| 22 | cache: npm |
| 23 | cache-dependency-path: pet/package-lock.json |
| 24 | - uses: dtolnay/rust-toolchain@1.100.0 |
| 25 | - run: npm --prefix pet ci --ignore-scripts |
| 26 | - run: npm --prefix pet run check |
| 27 | - run: npm --prefix pet run sync |
| 28 | - name: Embedded sources match canonical core |
| 29 | run: git diff --exit-code -- crates/tui/src/tui/pet_watch/pet-native.js |
| 30 | # The authored body is checked in five times and nothing kept the copies |
| 31 | # in step, so the Rust core silently carried a different whale from every |
| 32 | # other surface and conformance never passed. Compare them directly: no |
| 33 | # sync step produces these, so `git diff` cannot catch the drift. |
| 34 | - name: One whale body across every surface |
| 35 | run: | |
| 36 | canonical=crates/tui/src/tui/ambient_life/whale-points.tsv |
| 37 | for copy in pet/whale-points.tsv pet/public/whale-points.tsv pet/rs/whale-points.tsv; do |
| 38 | diff -q "$canonical" "$copy" || { |
| 39 | echo "::error file=$copy::diverged from $canonical; the Rust core is canonical" |
| 40 | exit 1 |
| 41 | } |
| 42 | done |
| 43 | - run: cargo fetch --locked --manifest-path pet/tui/Cargo.toml |
| 44 | - name: TypeScript and Rust parity, including reduced motion |
| 45 | run: ./pet/verify.sh |
| 46 |