Update ci steps

This commit is contained in:
Graham Christensen 2024-04-11 19:23:06 -04:00
parent a87d983438
commit c1d27e11c3

View file

@ -13,27 +13,15 @@ jobs:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Install Nix - name: Install Nix
uses: DeterminateSystems/nix-installer-action@main uses: DeterminateSystems/nix-installer-action@main
- name: Record existing bundle hash - uses: DeterminateSystems/magic-nix-cache-action@main
run: |
echo "BUNDLE_HASH=$(sha256sum <dist/index.js | sed 's/ -//')" >>$GITHUB_ENV
- name: Check shell scripts - name: Check shell scripts
run: | run: |
nix develop --command shellcheck ./.github/workflows/cache-test.sh nix develop --command shellcheck ./.github/workflows/cache-test.sh
- name: Build action - uses: DeterminateSystems/nix-installer-action@main
run: | - run: nix develop --command pnpm install
nix develop --command just build - run: nix develop --command pnpm run all
- name: Check bundle consistency - run: git status --porcelain=v1
run: | - run: test $(git status --porcelain=v1 2>/dev/null | wc -l) -eq 0
NEW_BUNDLE_HASH=$(sha256sum <dist/index.js | sed 's/ -//')
if [[ "$BUNDLE_HASH" != "$NEW_BUNDLE_HASH" ]]; then
>&2 echo "The committed dist/index.js is out-of-date!"
>&2 echo
>&2 echo " Committed: $BUNDLE_HASH"
>&2 echo " Built: $NEW_BUNDLE_HASH"
>&2 echo
>&2 echo 'Run `just build` then commit the resulting dist/index.js'
exit 1
fi
run-x86_64-linux: run-x86_64-linux:
name: Run x86_64 Linux name: Run x86_64 Linux