Skip to content

Update dependency shiki to v4 #1707

Update dependency shiki to v4

Update dependency shiki to v4 #1707

Workflow file for this run

name: test
on:
pull_request:
branches: [main]
push:
branches: [main]
schedule:
- cron: "0 0 * * 6" # Every Saturday
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [lts/*, latest]
fail-fast: false
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
cache: pnpm
- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.11
- name: Install dependencies
run: pnpm install
- name: Build packages
run: pnpm run build --filter=./packages/*
- run: pnpm run test
test-typesafety:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v6
with:
node-version: 24
cache: pnpm
- run: pnpm install
- run: pnpm run typecheck
test-build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [lts/*, latest]
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
cache: pnpm
- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.11
- run: pnpm install
- run: pnpm run build
resolve-playwright-version:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.out.outputs.version }}
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v6
with:
node-version: 24
cache: pnpm
- name: Install dependencies
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "1"
run: pnpm install --frozen-lockfile
- name: Read @playwright/test version
id: out
run: |
VER=$(awk '/overrides:/{flag=1; next} flag && /@playwright\/test/{print $2; exit}' pnpm-workspace.yaml | tr -d '",^')
echo "version=$VER" >> "$GITHUB_OUTPUT"
test-e2e:
needs: resolve-playwright-version
runs-on: ubuntu-latest
timeout-minutes: 16
strategy:
matrix:
suite: [e2e]
fail-fast: false
container:
image: mcr.microsoft.com/playwright:v${{ needs.resolve-playwright-version.outputs.version }}-noble
options: --user 1001
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 2
- name: Set Turbo base/head for PRs
if: ${{ github.event_name == 'pull_request' }}
run: |
echo "TURBO_SCM_BASE=${{ github.event.pull_request.base.sha || github.event.before }}" >> $GITHUB_ENV
echo "TURBO_SCM_HEAD=${{ github.sha }}" >> $GITHUB_ENV
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v6
with:
node-version: lts/*
cache: pnpm
- run: pnpm install
- name: Build www and dependencies
run: pnpm run build --filter=www...
- name: Run ${{ matrix.suite }} tests (PR)
if: ${{ github.event_name == 'pull_request' }}
run: pnpm run test:${{ matrix.suite }} --affected --log-order=stream
- name: Run ${{ matrix.suite }} tests (main/workflow_dispatch)
if: ${{ github.event_name != 'pull_request' }}
run: pnpm run test:${{ matrix.suite }} --log-order=stream --filter="@repo/playwright-*"
- uses: actions/upload-artifact@v6
if: ${{ !cancelled() }}
with:
name: test-results-${{ matrix.suite }}
path: "**/test-results/**"
retention-days: 30
test-windows:
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || contains(join(github.event.pull_request.labels.*.name, ','), 'windows')
runs-on: windows-latest
strategy:
matrix:
node-version: [lts/*, latest]
continue-on-error: ${{ matrix.node-version == 'latest' }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 2 # for checking against main and for following the PR history
- name: Set Turbo base/head for PRs
if: ${{ github.event_name == 'pull_request' }}
run: |
echo "TURBO_SCM_BASE=${{ github.event.pull_request.base.sha || github.event.before }}" >> $GITHUB_ENV
echo "TURBO_SCM_HEAD=${{ github.sha }}" >> $GITHUB_ENV
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
cache: pnpm
- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.11
- name: Install dependencies
run: pnpm install
- uses: actions/cache@v5
with:
path: ~/.cache/ms-playwright
key: windows-latest-pw-${{ hashFiles('pnpm-lock.yaml') }}-${{ matrix.node-version }}
restore-keys: |
windows-latest-pw-${{ hashFiles('pnpm-lock.yaml') }}-
windows-latest-pw-
- name: Install Playwright browsers
run: pnpm exec playwright install --with-deps
- name: Sanitize node version for artifact name
id: sanitize
shell: bash
run: |
SANITIZED=$(echo "${{ matrix.node-version }}" | sed 's/[\/\*]/-/g')
echo "version=$SANITIZED" >> "$GITHUB_OUTPUT"
- run: pnpm build
- run: pnpm run test
- run: pnpm run test:e2e
- uses: actions/upload-artifact@v6
if: ${{ !cancelled() }}
with:
name: test-results-windows-${{ steps.sanitize.outputs.version }}
path: "**/test-results/**"
retention-days: 30
test-macos:
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || contains(join(github.event.pull_request.labels.*.name, ','), 'macos')
runs-on: macos-latest
strategy:
matrix:
node-version: [lts/*, latest]
continue-on-error: ${{ matrix.node-version == 'latest' }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 2 # for checking against main and for following the PR history
- name: Set Turbo base/head for PRs
if: ${{ github.event_name == 'pull_request' }}
run: |
echo "TURBO_SCM_BASE=${{ github.event.pull_request.base.sha || github.event.before }}" >> $GITHUB_ENV
echo "TURBO_SCM_HEAD=${{ github.sha }}" >> $GITHUB_ENV
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
cache: pnpm
- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.11
- name: Install dependencies
run: pnpm install
- uses: actions/cache@v5
with:
path: ~/.cache/ms-playwright
key: macos-latest-pw-${{ hashFiles('pnpm-lock.yaml') }}-${{ matrix.node-version }}
restore-keys: |
macos-latest-pw-${{ hashFiles('pnpm-lock.yaml') }}-
macos-latest-pw-
- name: Install Playwright browsers
run: pnpm exec playwright install --with-deps
- name: Sanitize node version for artifact name
id: sanitize
shell: bash
run: |
SANITIZED=$(echo "${{ matrix.node-version }}" | sed 's/[\/\*]/-/g')
echo "version=$SANITIZED" >> "$GITHUB_OUTPUT"
- run: pnpm build
- run: pnpm run test
- run: pnpm run test:e2e
- uses: actions/upload-artifact@v6
if: ${{ !cancelled() }}
with:
name: test-results-macos-${{ steps.sanitize.outputs.version }}
path: "**/test-results/**"
retention-days: 30