Playwright + Chromatic update (#4015)

This commit is contained in:
pablonyx
2025-02-16 13:03:45 -08:00
committed by GitHub
parent f1fc8ac19b
commit e441c899af
2 changed files with 42 additions and 38 deletions

View File

@ -1,6 +1,6 @@
name: Run Chromatic Tests name: Run Playwright Tests
concurrency: concurrency:
group: Run-Chromatic-Tests-${{ github.workflow }}-${{ github.head_ref || github.event.workflow_run.head_branch || github.run_id }} group: Run-Playwright-Tests-${{ github.workflow }}-${{ github.head_ref || github.event.workflow_run.head_branch || github.run_id }}
cancel-in-progress: true cancel-in-progress: true
on: push on: push
@ -198,43 +198,47 @@ jobs:
cd deployment/docker_compose cd deployment/docker_compose
docker compose -f docker-compose.dev.yml -p danswer-stack down -v docker compose -f docker-compose.dev.yml -p danswer-stack down -v
chromatic-tests: # NOTE: Chromatic UI diff testing is currently disabled.
name: Chromatic Tests # We are using Playwright for local and CI testing without visual regression checks.
# Chromatic may be reintroduced in the future for UI diff testing if needed.
needs: playwright-tests # chromatic-tests:
runs-on: # name: Chromatic Tests
[
runs-on,
runner=32cpu-linux-x64,
disk=large,
"run-id=${{ github.run_id }}",
]
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup node # needs: playwright-tests
uses: actions/setup-node@v4 # runs-on:
with: # [
node-version: 22 # runs-on,
# runner=32cpu-linux-x64,
# disk=large,
# "run-id=${{ github.run_id }}",
# ]
# steps:
# - name: Checkout code
# uses: actions/checkout@v4
# with:
# fetch-depth: 0
- name: Install node dependencies # - name: Setup node
working-directory: ./web # uses: actions/setup-node@v4
run: npm ci # with:
# node-version: 22
- name: Download Playwright test results # - name: Install node dependencies
uses: actions/download-artifact@v4 # working-directory: ./web
with: # run: npm ci
name: test-results
path: ./web/test-results
- name: Run Chromatic # - name: Download Playwright test results
uses: chromaui/action@latest # uses: actions/download-artifact@v4
with: # with:
playwright: true # name: test-results
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} # path: ./web/test-results
workingDir: ./web
env: # - name: Run Chromatic
CHROMATIC_ARCHIVE_LOCATION: ./test-results # uses: chromaui/action@latest
# with:
# playwright: true
# projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
# workingDir: ./web
# env:
# CHROMATIC_ARCHIVE_LOCATION: ./test-results

View File

@ -23,7 +23,7 @@ export default defineConfig({
viewport: { width: 1280, height: 720 }, viewport: { width: 1280, height: 720 },
storageState: "admin_auth.json", storageState: "admin_auth.json",
}, },
testIgnore: ["**/codeUtils.test.ts"], testIgnore: ["**/codeUtils.test.ts", "**/chat/**/*.spec.ts"],
}, },
], ],
}); });