docs: use node:
prefix in example (#10486)
#17934
Workflow file for this run
This file contains 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: | |
- master | |
pull_request: | |
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 | |
permissions: | |
contents: read # to fetch code (actions/checkout) | |
jobs: | |
Lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: pnpm/action-setup@v2.2.4 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '16.x' | |
cache: pnpm | |
- run: pnpm install --frozen-lockfile | |
- run: pnpm run lint | |
- run: cd packages/kit && pnpm prepublishOnly | |
- run: pnpm run check | |
Tests: | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 30 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- node-version: 16 | |
os: ubuntu-latest | |
e2e-browser: 'chromium' | |
- node-version: 18 | |
os: ubuntu-latest | |
e2e-browser: 'chromium' | |
- node-version: 20 | |
os: ubuntu-latest | |
e2e-browser: 'chromium' | |
env: | |
KIT_E2E_BROWSER: ${{matrix.e2e-browser}} | |
steps: | |
- run: git config --global core.autocrlf false | |
- uses: actions/checkout@v3 | |
- uses: pnpm/action-setup@v2.2.4 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: pnpm | |
- run: pnpm install --frozen-lockfile | |
- run: pnpm playwright install ${{ matrix.e2e-browser }} | |
- run: pnpm test | |
- name: Archive test results | |
if: failure() | |
shell: bash | |
run: find packages -type d -name test-results -not -empty | tar -czf test-results.tar.gz --files-from=- | |
- name: Upload test results | |
if: failure() | |
uses: actions/upload-artifact@v3 | |
with: | |
retention-days: 3 | |
name: test-failure-${{ github.run_id }}-${{ matrix.os }}-${{ matrix.node-version }}-${{ matrix.e2e-browser }} | |
path: test-results.tar.gz | |
Cross-browser-test: | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 30 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- node-version: 16 | |
os: windows-2019 # slowness reported on newer versions https://github.com/actions/runner-images/issues/5166 | |
e2e-browser: 'chromium' | |
mode: 'dev' | |
- node-version: 16 | |
os: ubuntu-latest | |
e2e-browser: 'firefox' | |
mode: 'dev' | |
- node-version: 16 | |
os: macOS-latest | |
e2e-browser: 'webkit' | |
mode: 'dev' | |
- node-version: 16 | |
os: windows-2019 # slowness reported on newer versions https://github.com/actions/runner-images/issues/5166 | |
e2e-browser: 'chromium' | |
mode: 'build' | |
- node-version: 16 | |
os: ubuntu-latest | |
e2e-browser: 'firefox' | |
mode: 'build' | |
- node-version: 16 | |
os: macOS-latest | |
e2e-browser: 'webkit' | |
mode: 'build' | |
env: | |
KIT_E2E_BROWSER: ${{matrix.e2e-browser}} | |
steps: | |
- run: git config --global core.autocrlf false | |
- uses: actions/checkout@v3 | |
- uses: pnpm/action-setup@v2.2.4 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: pnpm | |
- run: pnpm install --frozen-lockfile | |
- run: pnpm playwright install ${{ matrix.e2e-browser }} | |
- run: pnpm test:cross-platform:${{ matrix.mode }} | |
- name: Archive test results | |
if: failure() | |
shell: bash | |
run: find packages -type d -name test-results -not -empty | tar -czf test-results-cross-platform-${{ matrix.mode }}.tar.gz --files-from=- | |
- name: Upload test results | |
if: failure() | |
uses: actions/upload-artifact@v3 | |
with: | |
retention-days: 3 | |
name: test-failure-cross-platform-${{ matrix.mode }}-${{ github.run_id }}-${{ matrix.os }}-${{ matrix.node-version }}-${{ matrix.e2e-browser }} | |
path: test-results-cross-platform-${{ matrix.mode }}.tar.gz | |
Test-create-svelte: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: pnpm/action-setup@v2.2.4 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
cache: pnpm | |
- run: pnpm install --frozen-lockfile | |
- run: cd packages/kit && pnpm prepublishOnly | |
- run: pnpm run test:create-svelte |