Skip to content

Add size examples & documentation #7989

Add size examples & documentation

Add size examples & documentation #7989

Workflow file for this run

name: CI
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
merge_group:
jobs:
install:
name: Install node modules
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v5
with:
version: 10.30.1
- name: Use Node 22.x
uses: actions/setup-node@v6
with:
node-version: 22.x
cache: "pnpm"
- run: pnpm install
audit:
name: Audit node modules
needs: install
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v5
with:
version: 10.30.1
- name: Use Node 22.x
uses: actions/setup-node@v6
with:
node-version: 22.x
cache: "pnpm"
- run: pnpm install
- run: pnpm audit
check:
name: Check code quality
needs: install
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v5
with:
version: 10.30.1
- uses: biomejs/setup-biome@v2
- name: Use Node 22.x
uses: actions/setup-node@v6
with:
node-version: 22.x
cache: "pnpm"
- run: pnpm install
- run: biome ci --error-on-warnings . --reporter=github
if: ${{ !cancelled() }}
- run: pnpm lint:copyright
if: ${{ !cancelled() }}
- run: pnpm prettier
if: ${{ !cancelled() }}
- run: pnpm --filter=@stratakit/test-app run typecheck
if: ${{ !cancelled() }}
build:
name: Build test app
needs: install
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v5
with:
version: 10.30.1
- name: Use Node 22.x
uses: actions/setup-node@v6
with:
node-version: 22.x
cache: "pnpm"
- run: pnpm install
- name: pnpm run build
uses: nick-fields/retry@v4
with:
timeout_minutes: 5
max_attempts: 3
command: pnpm run build
test:
name: Run e2e tests
needs: install
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.58.2-noble
strategy:
fail-fast: false
matrix:
shard: [1/4, 2/4, 3/4, 4/4]
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v5
with:
version: 10.30.1
- run: pnpm install
- run: pnpm run build
- name: Run playwright tests (${{ matrix.shard }})
uses: nick-fields/retry@v4
with:
timeout_minutes: 10
max_attempts: 2
command: pnpm --filter=@stratakit/test-app exec playwright test --shard=${{ matrix.shard }}
env:
HOME: /root
docs-tests:
name: Run e2e tests (website)
needs: install
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.58.2-noble
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v5
with:
version: 10.30.1
- run: pnpm install
- run: pnpm run build
- name: Run playwright tests (website)
run: pnpm --filter=@stratakit/website exec playwright test
internal-tests:
name: Run internal tests
needs: install
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v5
with:
version: 10.30.1
- name: Use Node 22.x
uses: actions/setup-node@v6
with:
node-version: 22.x
cache: "pnpm"
- run: pnpm install
- name: Run internal tests
run: pnpm --filter=internal test
deploy-gh-pages:
name: Deploy test app
if: ${{ github.event_name == 'pull_request' || github.event_name == 'push' }}
uses: "./.github/workflows/deploy-gh-pages.yaml"
with:
base: ${{ github.event.number || github.ref_name != 'main' && github.ref_name || '' }}