-
-
Notifications
You must be signed in to change notification settings - Fork 233
40 lines (38 loc) · 1.22 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: main
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
name: Build, lint, and test
runs-on: ubuntu-latest
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8.6.0
- uses: actions/setup-node@v3
with:
node-version: 18.x
cache: 'pnpm'
- run: pnpm install
# Playwright
- run: |
PLAYWRIGHT_VERSION=$(cat pnpm-lock.yaml | grep /@playwright/test@ | sed 's/.*@\([^:]*\):.*/\1/')
echo "PLAYWRIGHT_VERSION=$PLAYWRIGHT_VERSION" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Restore playwright
id: cache-playwright-browsers
with:
path: ~/.cache/ms-playwright
key: playwright-browsers-${{ env.PLAYWRIGHT_VERSION }}
- if: steps.cache-playwright-browsers.outputs.cache-hit != 'true'
# Setting up playwright in one example is sufficient
run: pnpm --filter example-next-13 exec playwright install --with-deps
- run: pnpm run build
- run: pnpm run lint
- run: pnpm run test
- run: pnpm run size