chore: fastify host and logging #7
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 api reference - localhost CDN | |
on: | |
push: | |
paths: | |
- 'examples/fastify-api-reference/**' | |
- 'packages/fastify-api-reference/**' | |
- 'packages/cdn-api-reference/**' | |
- '.github/workflows/test-api-reference-cdn-local.yml' | |
- 'tests/**' | |
branches-ignore: | |
- 'main' | |
jobs: | |
test: | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
node-version: [20] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v3 | |
with: | |
version: 8 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'pnpm' | |
- name: Install fastify api reference dependencies | |
run: pnpm --filter "@scalar-examples/fastify-api-reference..." install | |
- name: Install CDN api reference dependencies | |
run: pnpm --filter cdn-api-reference install | |
- name: Turborepo cache | |
uses: dtinth/setup-github-actions-caching-for-turbo@v1 | |
- name: Start local api-reference server | |
run: pnpm --filter @scalar-examples/fastify-api-reference dev & | |
- name: Start static html server | |
run: pnpm --filter cdn-api-reference dev & | |
- name: Get installed Playwright version | |
id: playwright-version | |
run: echo "PLAYWRIGHT_VERSION=$(node -e "console.log(require('./package.json').devDependencies['@playwright/test'])")" >> $GITHUB_ENV | |
- name: Install Playwright browser binaries & OS dependencies | |
run: pnpm exec playwright install --with-deps | |
- name: Run e2e tests | |
run: CI=1 pnpm test:e2e api-reference |