Add news page tests (#907) #19
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: Website | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- Website/** | |
pull_request: | |
paths: | |
- Website/** | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
playwright: | |
name: Playwright test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
sparse-checkout: "Website" | |
lfs: true | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- name: Setup node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
cache: "pnpm" | |
cache-dependency-path: "Website/pnpm-lock.yaml" | |
- name: Install dependencies | |
working-directory: Website/ | |
run: pnpm install | |
- name: Install Playwright browsers | |
working-directory: Website/ | |
run: pnpm exec playwright install --with-deps chromium | |
- name: Run Playwright tests | |
working-directory: Website/ | |
run: pnpm exec playwright test | |
- name: Upload report | |
uses: actions/upload-artifact@v4 | |
if: ${{ !cancelled() }} | |
with: | |
name: playwright-report | |
path: Website/playwright-report/ | |
retention-days: 3 | |
- name: Upload snapshots | |
uses: actions/upload-artifact@v4 | |
if: ${{ !cancelled() }} | |
with: | |
name: snapshots | |
path: Website/tests/__screenshots__/ | |
retention-days: 3 | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
sparse-checkout: "Website" | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- name: Setup node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
cache: "pnpm" | |
cache-dependency-path: "Website/pnpm-lock.yaml" | |
- name: Install dependencies | |
working-directory: Website/ | |
run: pnpm install | |
- name: Prettier | |
working-directory: Website/ | |
run: pnpm run lint:prettier | |
- name: ESLint | |
working-directory: Website/ | |
run: pnpm run lint:eslint | |
- name: svelte-check | |
working-directory: Website/ | |
run: pnpm run check |