Bump the minors group across 1 directory with 14 updates #648
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: Tests | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
defaults: | |
run: | |
working-directory: webserver | |
jobs: | |
playwright: | |
strategy: | |
matrix: | |
environment: [dev, prod] | |
timeout-minutes: 60 | |
runs-on: ubuntu-latest | |
container: | |
# This version has to exactly match the version in //webserver/pnpm-lock.yaml. | |
image: mcr.microsoft.com/playwright:v1.47.0-noble | |
services: | |
# See https://docs.github.com/en/actions/using-containerized-services/creating-postgresql-service-containers. | |
db: | |
image: postgres:14-alpine | |
env: | |
POSTGRES_USER: prisma | |
POSTGRES_PASSWORD: prisma | |
POSTGRES_DB: tests | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 2s | |
--health-timeout 5s | |
--health-retries 5 | |
env: | |
DATABASE_URL: "postgresql://prisma:prisma@db:5432/tests?statement_cache_size=0" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
package_json_file: "webserver/package.json" | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: "pnpm" | |
cache-dependency-path: "webserver/pnpm-lock.yaml" | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Initialize Prisma and DB | |
run: pnpm prisma db push --force-reset | |
- name: Build | |
run: pnpm run build | |
- name: Run Playwright tests | |
run: pnpm exec playwright test | |
env: | |
DEBUG: "pw:webserver" | |
ENVIRONMENT: ${{ matrix.environment }} | |
- uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: test-results | |
path: webserver/test-results/ | |
retention-days: 30 | |
astro-check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
package_json_file: "webserver/package.json" | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: "pnpm" | |
cache-dependency-path: "webserver/pnpm-lock.yaml" | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Generate Prisma client | |
run: pnpm prisma generate | |
- name: Check types in .astro files | |
run: pnpm astro check | |
tsc: | |
name: Check Typescript types | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
package_json_file: "webserver/package.json" | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: "pnpm" | |
cache-dependency-path: "webserver/pnpm-lock.yaml" | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Generate Prisma client | |
run: pnpm prisma generate | |
- name: Generate Astro types | |
run: pnpm astro sync | |
- name: Check typescript types | |
run: pnpm tsc | |
vitest: | |
name: Run unit tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
package_json_file: "webserver/package.json" | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: "pnpm" | |
cache-dependency-path: "webserver/pnpm-lock.yaml" | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Generate Prisma client | |
run: pnpm prisma generate | |
- name: Run Vitest | |
run: pnpm vitest |