Skip to content

Commit ec3fe05

Browse files
committed
ci: prevent stale bun2nix dependency hangs
1 parent 42c3107 commit ec3fe05

3 files changed

Lines changed: 48 additions & 31 deletions

File tree

.github/workflows/nix.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ jobs:
9292
- name: Set Up Nix
9393
uses: ./.github/actions/setup-nix
9494

95+
- name: Check Generated Bun Dependencies
96+
run: just bun-nix-check
97+
9598
- name: Materialize Flake Partitions
9699
run: |
97100
nix store add-path nix/dev
@@ -131,7 +134,7 @@ jobs:
131134
needs: checks
132135
if: needs.checks.outputs.build-native == 'true'
133136
runs-on: ubuntu-latest
134-
timeout-minutes: 90
137+
timeout-minutes: 15
135138
strategy:
136139
fail-fast: false
137140
matrix:

Justfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -944,6 +944,20 @@ _check-github-actions:
944944
_check-bun: (doctor 'bun')
945945
bun run check
946946

947+
# Verify bun2nix's dependency expression matches the independently packaged
948+
# Hyper Window Tiling extension's Bun lockfile.
949+
[group('check')]
950+
bun-nix-check:
951+
generated=$(nix run .#bun2nix -- \
952+
--lock-file packages/hyper-window-tiling/bun.lock \
953+
--copy-prefix packages/hyper-window-tiling)
954+
if ! diff -u \
955+
packages/hyper-window-tiling/bun.nix \
956+
<(printf '%s\n' "$generated"); then
957+
printf 'packages/hyper-window-tiling/bun.nix is stale; run `just bun-nix-update`.\n' >&2
958+
exit 1
959+
fi
960+
947961
# Regenerate bun2nix's dependency expression for the independently packaged
948962
# Hyper Window Tiling extension after its Bun lockfile changes.
949963
[group('dev')]

packages/hyper-window-tiling/bun.nix

Lines changed: 30 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)