Skip to content

Merge pull request #421 from DeterminateSystems/js-updates #216

Merge pull request #421 from DeterminateSystems/js-updates

Merge pull request #421 from DeterminateSystems/js-updates #216

Workflow file for this run

name: Run Zero to Nix site tests
on:
pull_request:
push:
branches:
- main
jobs:
test:
runs-on: UbuntuLatest32Cores128G
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
permissions:
id-token: write
contents: read
steps:
- name: git checkout
uses: actions/checkout@v4
- name: Check Nixpkgs input
uses: DeterminateSystems/flake-checker-action@main
with:
fail-mode: true
- name: Restore Lychee cache
uses: actions/cache@v3
with:
path: .lycheecache
key: lychee-link-check
restore-keys: cache-lychee-
- uses: DeterminateSystems/nix-installer-action@main
with:
determinate: true
- uses: DeterminateSystems/flakehub-cache-action@main
- name: Run Nix CI suite
run: nix develop --command ci
- name: Check external links
uses: lycheeverse/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: >-
--cache
--verbose
--no-progress
./dist
fail: false
- name: Check templates
run: |
./scripts/check-templates.sh
build-pkg-templates:
runs-on: ${{ matrix.systems.runner }}
needs: test
permissions:
id-token: write
contents: write
strategy:
matrix:
systems:
- nix-system: aarch64-darwin
runner: macos-latest-xlarge
- nix-system: x86_64-darwin
runner: macos-latest-xlarge
- nix-system: x86_64-linux
runner: UbuntuLatest32Cores128G
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
with:
determinate: true
- uses: DeterminateSystems/flakehub-cache-action@main
- name: Build packages in pkg templates
run: ./scripts/build-pkg-templates.sh
- name: Fix hash mismatches
if: failure() && github.event_name == 'pull_request'
id: fix-hashes
run: |
git stash --include-untracked
git fetch --depth=1 origin "$GITHUB_HEAD_REF"
git checkout -B "$GITHUB_HEAD_REF" "${{ github.event.pull_request.head.sha }}"
determinate-nixd fix hashes --auto-apply
if ! git diff --quiet; then
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add --update --ignore-removal .
git commit -m "[dependabot skip] Automatically fix Nix hashes"
git push origin "$GITHUB_HEAD_REF"
fi
git checkout -
git stash pop || true