@@ -297,9 +297,6 @@ jobs:
297297 - name : Lint documentation
298298 run : pnpm lint-documentation
299299
300- - name : Markdown lint
301- run : pnpm markdown-lint
302-
303300 lint-other :
304301 needs :
305302 - setup-build
@@ -324,7 +321,9 @@ jobs:
324321 with :
325322 path : .cache/tsbuildinfo
326323 key : tsbuildinfo-${{ hashFiles('pnpm-lock.yaml') }}
327- restore-keys : tsbuildinfo-${{ hashFiles('pnpm-lock.yaml') }}-
324+ restore-keys : |
325+ tsbuildinfo-${{ hashFiles('pnpm-lock.yaml') }}-
326+ tsbuildinfo-
328327
329328 - name : Type check
330329 run : pnpm type-check
@@ -349,8 +348,6 @@ jobs:
349348 run : pnpm lint-other
350349
351350 lint-actions :
352- needs :
353- - setup-build
354351 runs-on : ubuntu-latest
355352 timeout-minutes : 7
356353 permissions :
@@ -362,7 +359,9 @@ jobs:
362359 with :
363360 persist-credentials : false
364361 show-progress : false
365- sparse-checkout : .github/workflows
362+ # include local composite actions, so that actionlint validates
363+ # their metadata, and zizmor audits them
364+ sparse-checkout : .github/
366365
367366 - name : Check workflow files
368367 uses : docker://rhysd/actionlint:1.7.12@sha256:b1934ee5f1c509618f2508e6eb47ee0d3520686341fec936f3b79331f9315667
@@ -410,16 +409,27 @@ jobs:
410409 uses : actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
411410 with :
412411 path : .cache/vitest
412+ # the shard cache key comes before the lockfile hash so that
413+ # `restore-keys` can fall back to the same shard's cache after
414+ # a lockfile change
413415 key : |
414416 vitest-cache-${{
415417 runner.os
416418 }}-${{
417419 env.NODE_VERSION
420+ }}-${{
421+ matrix.cache-key
418422 }}-${{
419423 hashFiles('pnpm-lock.yaml')
424+ }}
425+ restore-keys : |
426+ vitest-cache-${{
427+ runner.os
428+ }}-${{
429+ env.NODE_VERSION
420430 }}-${{
421431 matrix.cache-key
422- }}
432+ }}-
423433
424434 - name : Unit tests
425435 shell : bash
@@ -491,7 +501,7 @@ jobs:
491501 with :
492502 use_oidc : true
493503 directory : coverage/lcov
494- fail_ci_if_error : github.event_name != 'pull_request'
504+ fail_ci_if_error : ${{ github.event_name != 'pull_request' }}
495505 verbose : true
496506
497507 coverage-threshold :
@@ -545,6 +555,10 @@ jobs:
545555 - codecov
546556 - coverage-threshold
547557 - lint-actions
558+ - lint-docs
559+ - lint-other
560+ - lint-oxlint
561+ - lint-prettier
548562 - build-docker
549563 - build-docs
550564 runs-on : ubuntu-latest
@@ -603,6 +617,30 @@ jobs:
603617 needs.lint-actions.result == 'skipped'
604618 run : exit 1
605619
620+ - name : Fail for failed or cancelled linting
621+ if : |
622+ needs.lint-docs.result == 'failure' ||
623+ needs.lint-docs.result == 'cancelled' ||
624+ needs.lint-other.result == 'failure' ||
625+ needs.lint-other.result == 'cancelled' ||
626+ needs.lint-oxlint.result == 'failure' ||
627+ needs.lint-oxlint.result == 'cancelled' ||
628+ needs.lint-prettier.result == 'failure' ||
629+ needs.lint-prettier.result == 'cancelled'
630+ run : exit 1
631+
632+ - name : Fail for skipped linting when PR is ready for review
633+ if : |
634+ github.event_name == 'pull_request' &&
635+ github.event.pull_request.draft != true &&
636+ (
637+ needs.lint-docs.result == 'skipped' ||
638+ needs.lint-other.result == 'skipped' ||
639+ needs.lint-oxlint.result == 'skipped' ||
640+ needs.lint-prettier.result == 'skipped'
641+ )
642+ run : exit 1
643+
606644 - name : Fail for failed or cancelled docs build
607645 if : |
608646 needs.build-docs.result == 'failure' ||
@@ -701,7 +739,6 @@ jobs:
701739
702740 build-docs :
703741 needs :
704- - lint-docs
705742 - setup-build
706743 runs-on : ubuntu-latest
707744 timeout-minutes : 5
@@ -722,7 +759,7 @@ jobs:
722759 - name : Setup uv
723760 uses : astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
724761 with :
725- version : 0.12.3
762+ version : 0.12.7
726763 enable-cache : true
727764 cache-python : true
728765
@@ -845,32 +882,43 @@ jobs:
845882 with :
846883 node-version : ${{ needs.setup-build.outputs.node-version }}
847884 os : ${{ runner.os }}
885+ # ensure that the release job installs fresh, with installed pacakges verified against the lockfile's integrity hashes
886+ use-cache : false
848887
849888 - name : Install newer npm if needed
850889 run : ' dpkg --compare-versions "$(npm -v)" lt 11.5.1 && (npm update -g npm; echo "updated npm to: $(npm -v)") || echo "npm is new enough: $(npm -v)"'
851890
852891 - uses : sigstore/cosign-installer@6f9f17788090df1f26f669e9d70d6ae9567deba6 # v4.1.2
853892
854893 - name : Docker registry login
894+ env :
895+ DOCKER_USERNAME : ${{ secrets.DOCKER_USERNAME }}
896+ DOCKER_PASSWORD : ${{ secrets.DOCKER_PASSWORD }}
897+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
898+ REPOSITORY_OWNER : ${{ github.repository_owner }}
855899 run : |
856- echo "${{ secrets. DOCKER_PASSWORD }} " | docker login -u ${{ secrets. DOCKER_USERNAME }} --password-stdin
857- echo "${{ secrets. GITHUB_TOKEN }} " | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin
900+ echo "$DOCKER_PASSWORD" | docker login -u "$ DOCKER_USERNAME" --password-stdin
901+ echo "$GITHUB_TOKEN" | docker login ghcr.io -u "$REPOSITORY_OWNER" --password-stdin
858902
859903 - name : Setup uv
860904 uses : astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
861905 with :
862- version : 0.12.3
863- enable-cache : true
906+ version : 0.12.7
907+ # ensure that the release job installs fresh, with installed pacakges verified against the lockfile's integrity hashes
908+ enable-cache : false
864909 cache-python : true
865910
866911 - name : Install uv dependencies
867912 run : uv sync --locked
868913
869914 - name : Check dry run
915+ env :
916+ EVENT_NAME : ${{ github.event_name }}
917+ INPUT_DRY_RUN : ${{ github.event.inputs.dryRun }}
870918 run : |
871- if [[ "${{github.event_name}} " == "workflow_dispatch" && "${{ github.event.inputs.dryRun }} " != "true" ]]; then
919+ if [[ "$EVENT_NAME " == "workflow_dispatch" && "$INPUT_DRY_RUN " != "true" ]]; then
872920 echo "DRY_RUN=false" >> "$GITHUB_ENV"
873- elif [[ "${{env. DO_RELEASE}} " == "true" ]]; then
921+ elif [[ "$DO_RELEASE" == "true" ]]; then
874922 echo "DRY_RUN=false" >> "$GITHUB_ENV"
875923 fi
876924
@@ -891,7 +939,7 @@ jobs:
891939
892940 - name : semantic-release
893941 run : |
894- pnpm semantic-release --dry-run ${{env. DRY_RUN}}
942+ pnpm semantic-release --dry-run "$ DRY_RUN"
895943 env :
896944 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
897945 LOG_LEVEL : debug
0 commit comments