mirror of
https://github.com/DeterminateSystems/magic-nix-cache-action.git
synced 2024-12-26 09:20:35 +01:00
Update ci steps
This commit is contained in:
parent
a87d983438
commit
c1d27e11c3
1 changed files with 6 additions and 18 deletions
24
.github/workflows/ci.yml
vendored
24
.github/workflows/ci.yml
vendored
|
@ -13,27 +13,15 @@ jobs:
|
|||
- uses: actions/checkout@v3
|
||||
- name: Install Nix
|
||||
uses: DeterminateSystems/nix-installer-action@main
|
||||
- name: Record existing bundle hash
|
||||
run: |
|
||||
echo "BUNDLE_HASH=$(sha256sum <dist/index.js | sed 's/ -//')" >>$GITHUB_ENV
|
||||
- uses: DeterminateSystems/magic-nix-cache-action@main
|
||||
- name: Check shell scripts
|
||||
run: |
|
||||
nix develop --command shellcheck ./.github/workflows/cache-test.sh
|
||||
- name: Build action
|
||||
run: |
|
||||
nix develop --command just build
|
||||
- name: Check bundle consistency
|
||||
run: |
|
||||
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
|
||||
- uses: DeterminateSystems/nix-installer-action@main
|
||||
- run: nix develop --command pnpm install
|
||||
- run: nix develop --command pnpm run all
|
||||
- run: git status --porcelain=v1
|
||||
- run: test $(git status --porcelain=v1 2>/dev/null | wc -l) -eq 0
|
||||
|
||||
run-x86_64-linux:
|
||||
name: Run x86_64 Linux
|
||||
|
|
Loading…
Reference in a new issue