This commit updates the workflow configuration to use the 'pnpm/action-setup' GitHub Action. This eliminates the need for a separate step to globally install pnpm, simplifying the dependency installation process. Both the setup and the use of pnpm have been streamlined.
74 lines
1.6 KiB
YAML
74 lines
1.6 KiB
YAML
name: Workflow
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
pull_request:
|
|
branches: [ main ]
|
|
jobs:
|
|
typescript:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 2
|
|
|
|
- uses: pnpm/action-setup@v2
|
|
with:
|
|
version: 6.32.9
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: lts/*
|
|
cache: 'pnpm'
|
|
|
|
- uses: actions/cache@v4
|
|
with:
|
|
path: .turbo
|
|
key: ${{ runner.os }}-turbo-${{ github.sha }}
|
|
restore-keys: |
|
|
${{ runner.os }}-turbo-
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install
|
|
- name: Typecheck
|
|
run: pnpm run typecheck
|
|
- name: Lint
|
|
run: pnpm run lint
|
|
|
|
test:
|
|
timeout-minutes: 15
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 2
|
|
|
|
- uses: pnpm/action-setup@v2
|
|
with:
|
|
version: 6.32.9
|
|
|
|
- uses: actions/cache@v4
|
|
with:
|
|
path: .turbo
|
|
key: ${{ runner.os }}-turbo-${{ github.sha }}
|
|
restore-keys: |
|
|
${{ runner.os }}-turbo-
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: lts/*
|
|
cache: 'pnpm'
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install
|
|
- name: Install Playwright Browsers
|
|
run: pnpm exec ./apps/e2e/node_modules/.bin/playwright install --with-deps
|
|
- name: Run Playwright tests
|
|
run: pnpm run test
|
|
- uses: actions/upload-artifact@v4
|
|
if: always()
|
|
with:
|
|
name: playwright-report
|
|
path: playwright-report/
|
|
retention-days: 30
|