mirror of
https://github.com/DeterminateSystems/magic-nix-cache-action.git
synced 2024-12-23 13:32:03 +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
|
- 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
|
||||||
|
|
Loading…
Reference in a new issue