chore(deps): update patch tuesday (playwright) to v1.50.1 #234
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: Validate app | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
combined: | |
runs-on: ubuntu-24.04 | |
env: | |
DATABASE_URL: postgresql://postgres:postgres@postgres:5432/postgres | |
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
TURBO_TEAM: ${{ vars.TURBO_TEAM }} | |
ENCRYPTION_KEY: ld91x9FB31jEae0nSjd/YqaJU9ZQS/QzLLJVcAITYBo= # No real key (openssl rand --base64 32) | |
steps: | |
- uses: actions/[email protected] | |
with: | |
lfs: true | |
- uses: actions/[email protected] | |
with: | |
node-version-file: .nvmrc | |
- name: Get npm cache directory | |
id: npm-cache-dir | |
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT} | |
- uses: actions/[email protected] | |
with: | |
path: ${{ steps.npm-cache-dir.outputs.dir }} | |
key: ${{ runner.os }}-${{ hashFiles('.nvmrc', 'package-lock.json', 'packages/database/prisma/prisma.schema') }} | |
- name: Install dependencies | |
run: npm ci --prefer-offline | |
# - name: Cache turbo build setup | |
# uses: actions/[email protected] | |
# with: | |
# path: .turbo | |
# key: ${{ runner.os }}-turbo-${{ github.sha }} | |
# restore-keys: | | |
# ${{ runner.os }}-turbo- | |
- name: Build | |
run: npx turbo run build | |
continue-on-error: true | |
id: build | |
- name: Lint | |
run: npm run lint --workspace=apps/app | |
env: | |
SKIP_VALIDATION: "1" | |
continue-on-error: true | |
if: steps.build.outcome == 'success' | |
- name: Prettier | |
run: npx --workspace=apps/app prettier --check . | |
continue-on-error: true | |
- name: Test | |
run: npm run test --workspace=apps/app | |
continue-on-error: true | |
playwright: | |
needs: combined | |
runs-on: ubuntu-24.04 | |
env: | |
DATABASE_URL: postgresql://postgres:postgres@postgres:5432/postgres | |
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
TURBO_TEAM: ${{ vars.TURBO_TEAM }} | |
ENCRYPTION_KEY: ld91x9FB31jEae0nSjd/YqaJU9ZQS/QzLLJVcAITYBo= # No real key (openssl rand --base64 32) | |
container: mcr.microsoft.com/playwright:v1.50.1-noble | |
services: | |
postgres: | |
image: postgres:17.0-alpine3.20 | |
env: | |
POSTGRES_PASSWORD: postgres | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
--health-start-period 10s | |
maildev: | |
image: maildev/maildev:2.2.1 | |
env: | |
MAILDEV_WEB_PORT: 1080 | |
MAILDEV_SMTP_PORT: 1025 | |
options: >- | |
--health-cmd "wget --spider --tries=1 http://127.0.0.1:1080/healthz" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
--health-start-period 10s | |
steps: | |
# The container comes without preinstalled Git LFS | |
- name: Install Git LFS | |
run: | | |
apt-get update | |
apt-get install git-lfs | |
git lfs install | |
- uses: actions/[email protected] | |
with: | |
lfs: true | |
- uses: actions/[email protected] | |
with: | |
node-version-file: .nvmrc | |
- name: Get npm cache directory | |
id: npm-cache-dir | |
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT} | |
- uses: actions/[email protected] | |
with: | |
path: ${{ steps.npm-cache-dir.outputs.dir }} | |
key: ${{ runner.os }}-${{ hashFiles('.nvmrc', 'package-lock.json', 'packages/database/prisma/prisma.schema') }} | |
- name: Install dependencies | |
run: npm ci --prefer-offline | |
# - name: Cache turbo build setup | |
# uses: actions/[email protected] | |
# with: | |
# path: .turbo | |
# key: ${{ runner.os }}-turbo-${{ github.sha }} | |
# restore-keys: | | |
# ${{ runner.os }}-turbo- | |
- name: Build | |
run: npx turbo run build | |
# https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md#postgresql | |
- name: Prepare database | |
run: npx --workspace=packages/database prisma db push | |
- name: Run Playwright tests | |
run: npx --workspace=apps/playwright playwright test | |
env: | |
SMTP_HOST: maildev | |
SMTP_PORT: 1025 | |
SMTP_FROM: [email protected] | |
NODE_TLS_REJECT_UNAUTHORIZED: 0 | |
SIGNUP_ENABLED: true | |
MAILDEV_BASE_URL: http://maildev:1080 | |
- uses: actions/[email protected] | |
if: always() | |
with: | |
name: playwright-report | |
path: apps/playwright/playwright-report/ | |
retention-days: 7 |