chore(deps): update all non-major dependencies #3842
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | ||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| env: | ||
| # we call `pnpm playwright install` instead | ||
| PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: '1' | ||
| # cancel in-progress runs on new commits to same PR (gitub.event.number) | ||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.event.number || github.sha }} | ||
| cancel-in-progress: true | ||
| # use min permissions | ||
| permissions: | ||
| contents: read # to fetch code (actions/checkout) | ||
| jobs: | ||
| # "checks" job runs on linux + node lts only and checks that install, build, lint and audit work | ||
| # it also primes the pnpm store cache for linux, important for downstream tests | ||
| checks: | ||
| timeout-minutes: 5 | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| matrix: | ||
| # pseudo-matrix for convenience, NEVER use more than a single combination | ||
| node: [22] | ||
| os: [ubuntu-latest] | ||
| steps: | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| persist-credentials: 'false' | ||
| - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 | ||
| with: | ||
| node-version: ${{ matrix.node }} | ||
| package-manager-cache: false # pnpm is not installed yet | ||
| - name: install pnpm | ||
| shell: bash | ||
| run: | | ||
| PNPM_VER=$(jq -r '.packageManager | if .[0:5] == "pnpm@" then .[5:] else "packageManager in package.json does not start with pnpm@\n" | halt_error(1) end' package.json) | ||
| echo installing pnpm version $PNPM_VER | ||
| npm i -g pnpm@$PNPM_VER | ||
| - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 | ||
| with: | ||
| node-version: ${{ matrix.node }} | ||
| package-manager-cache: true # caches pnpm via packageManager field in package.json | ||
| cache: 'pnpm' | ||
| - name: install | ||
| run: pnpm install --frozen-lockfile --prefer-offline --ignore-scripts | ||
| - name: sync | ||
| run: pnpm -r sync # required to ensure sveltekit test project have tsconfig.json which may be required by the checks below | ||
| - name: format | ||
| run: pnpm check:format | ||
| - name: lint | ||
| if: (${{ success() }} || ${{ failure() }}) | ||
|
Check warning on line 60 in .github/workflows/ci.yml
|
||
| run: pnpm check:lint | ||
| - name: types | ||
| if: (${{ success() }} || ${{ failure() }}) | ||
|
Check warning on line 63 in .github/workflows/ci.yml
|
||
| run: pnpm check:types | ||
| - name: audit | ||
| if: (${{ success() }} || ${{ failure() }}) | ||
|
Check warning on line 66 in .github/workflows/ci.yml
|
||
| run: pnpm check:audit | ||
| - name: publint | ||
| if: (${{ success() }} || ${{ failure() }}) | ||
|
Check warning on line 69 in .github/workflows/ci.yml
|
||
| run: pnpm check:publint | ||
| - name: generated types are up to date | ||
| if: (${{ success() }} || ${{ failure() }}) | ||
|
Check warning on line 72 in .github/workflows/ci.yml
|
||
| run: pnpm generate:types && [ "`git status --porcelain=v1`" == "" ] | ||
| # "test" job runs on linux, windows, mac with node active lts and linux with node maintenance lts | ||
| test: | ||
| timeout-minutes: 10 | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| node: [22] | ||
| os: [ubuntu-latest, macos-latest, windows-latest] | ||
| vite: ['current'] | ||
| svelte: ['current'] | ||
| include: | ||
| - node: 20 | ||
| os: ubuntu-latest | ||
| vite: 'current' | ||
| svelte: 'current' | ||
| - node: 24 | ||
| os: ubuntu-latest | ||
| vite: 'current' | ||
| svelte: 'current' | ||
| # baseline test lowest svelte, vite and node version | ||
| - node: 20.19 | ||
| os: ubuntu-latest | ||
| vite: 'baseline' | ||
| svelte: 'baseline' | ||
| steps: | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| persist-credentials: 'false' | ||
| - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 | ||
| with: | ||
| node-version: ${{ matrix.node }} | ||
| package-manager-cache: false # pnpm is not installed yet | ||
| - name: install pnpm | ||
| shell: bash | ||
| run: | | ||
| PNPM_VER=$(jq -r '.packageManager | if .[0:5] == "pnpm@" then .[5:] else "packageManager in package.json does not start with pnpm@\n" | halt_error(1) end' package.json) | ||
| echo installing pnpm version $PNPM_VER | ||
| npm i -g pnpm@$PNPM_VER | ||
| - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 | ||
| with: | ||
| node-version: ${{ matrix.node }} | ||
| package-manager-cache: true # caches pnpm via packageManager field in package.json | ||
| cache: 'pnpm' | ||
| - name: install | ||
| run: pnpm install --frozen-lockfile --ignore-scripts | ||
| - name: downgrade vite to baseline | ||
| if: matrix.vite == 'baseline' | ||
| run: | | ||
| pnpm update -r --no-save vite@8.0.0-beta.7 | ||
| pnpm ls vite | ||
| - name: downgrade svelte to baseline | ||
| if: matrix.svelte == 'baseline' | ||
| run: | | ||
| pnpm update -r --no-save svelte@5.46.4 | ||
| pnpm ls svelte | ||
| - name: install playwright chromium | ||
| run: pnpm playwright install chromium --only-shell | ||
| - name: run tests | ||
| run: pnpm test | ||
| - name: archive tests temp directory | ||
| if: failure() | ||
| shell: bash | ||
| run: tar -cvf test-temp.tar --exclude="node_modules" temp/ | ||
| - uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 | ||
| if: failure() | ||
| with: | ||
| name: test-failure-${{github.run_id}}-os_${{ matrix.os }}-node_${{ matrix.node }}-vite_${{ matrix.vite }}-svelte_${{matrix.svelte}} | ||
| path: | | ||
| test-temp.tar | ||
| pnpm-debug.log | ||