feat: client credentials flow #220
Workflow file for this run
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: Test CDN Build (local) | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
test: | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
node-version: [20] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm install | |
- name: Turborepo cache | |
uses: actions/cache@v4 | |
with: | |
path: .turbo | |
key: ${{ runner.os }}-turbo-node-${{ matrix.node-version }} | |
restore-keys: | | |
${{ runner.os }}-turbo-node- | |
- name: Build packages | |
run: pnpm build:packages | |
- name: Get Playwright version | |
id: playwright-version | |
run: echo "PLAYWRIGHT_VERSION=$(npx playwright --version | cut -d' ' -f2)" >> $GITHUB_ENV | |
- name: Playwright binary cache | |
uses: actions/cache@v4 | |
id: playwright-cache | |
with: | |
path: | | |
~/.cache/ms-playwright | |
key: ${{ runner.os }}-playwright-${{ steps.playwright-version.outputs.PLAYWRIGHT_VERSION }} | |
restore-keys: | | |
${{ runner.os }}-playwright- | |
- name: Install Playwright browsers | |
run: npx playwright install | |
if: steps.playwright-cache.outputs.cache-hit != 'true' | |
- name: Install Playwright dependencies | |
run: npx playwright install-deps | |
- name: Start HTML server | |
run: pnpm --filter @scalar-examples/cdn-api-reference dev & | |
- name: Run e2e tests (local) | |
run: CI=1 pnpm test:e2e:local |