Add try blocks (#28) #178
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: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
checks: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
cache: "pnpm" | |
- run: pnpm install --frozen-lockfile | |
- run: pnpm run format:check | |
- run: pnpm run build | |
test-node: | |
needs: checks | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: "pnpm" | |
- run: pnpm install --frozen-lockfile | |
- run: pnpm run test:ts | |
- run: pnpm run test:node | |
test-browser: | |
needs: checks | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
cache: "pnpm" | |
- name: Cache Playwright Browsers | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cache/ms-playwright/ | |
key: ${{ runner.os }}-playwright-${{ hashFiles('pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-playwright- | |
- run: pnpm install --frozen-lockfile | |
- run: pnpm exec playwright install | |
- run: pnpm run test:browser |