Trying to make e2e be truly non-interactive and headless.
Some checks failed
Tests / Mixed Line Ending Check (push) Has been cancelled
Tests / Darglint Docstring Check (push) Has been cancelled
Tests / Frontend Tests (push) Has been cancelled
Tests / End of File Check (push) Has been cancelled
Tests / Build and Push CICD Image (push) Has started running
Tests / YAML Syntax Check (push) Has been cancelled
Tests / TOML Formatting Check (push) Has been cancelled
Tests / Ruff Linting (push) Has been cancelled
Tests / Ruff Format Check (push) Has been cancelled
Tests / No Docstring Types Check (push) Has been cancelled
Tests / End-to-End Tests (push) Has been cancelled
Tests / TOML Syntax Check (push) Has been cancelled
Tests / TSDoc Lint Check (push) Has been cancelled
Tests / Trailing Whitespace Check (push) Has been cancelled
Tests / Pyright Type Check (push) Has been cancelled
Tests / ESLint Check (push) Has been cancelled
Tests / Backend Tests (push) Has been cancelled
Tests / Prettier Format Check (push) Has been cancelled
Tests / Integration Tests (push) Has been cancelled
Tests / TypeScript Type Check (push) Has been cancelled
Tests / Backend Doctests (push) Has been cancelled

Signed-off-by: Cliff Hill <xlorep@darkhelm.org>
This commit is contained in:
2025-10-30 22:32:59 -04:00
parent aee066d611
commit c5660e547a
3 changed files with 31 additions and 8 deletions

View File

@@ -405,11 +405,13 @@ jobs:
- name: Run E2E tests
run: |
docker pull dogar.darkhelm.org/darkhelm.org/plex-playlist/cicd:${GITHUB_SHA:-latest}
docker run --rm dogar.darkhelm.org/darkhelm.org/plex-playlist/cicd:${GITHUB_SHA:-latest} bash -c "
docker run --rm -e CI=true dogar.darkhelm.org/darkhelm.org/plex-playlist/cicd:${GITHUB_SHA:-latest} bash -c "
cd /workspace/frontend &&
if [ -d 'tests/e2e' ] || grep -q 'playwright' package.json; then
echo 'Running E2E tests with Playwright...' &&
yarn test:e2e
export CI=true &&
export NODE_ENV=test &&
yarn playwright test --reporter=list --headed=false
else
echo ' No E2E tests found'
fi

View File

@@ -235,13 +235,23 @@ yarn test
# Run unit tests with coverage
yarn test:coverage
# Run E2E tests
# Run E2E tests (Playwright)
yarn test:e2e
# Run E2E tests in headless mode (CI-like)
yarn playwright test --headed=false
# Run E2E tests with specific reporter
yarn playwright test --reporter=list
# Run E2E tests for specific browser
yarn playwright test --project=chromium
```
### Project-wide Tools
#### YAML/TOML Validation
```bash
# Check YAML files
pre-commit run check-yaml --all-files
@@ -251,6 +261,7 @@ pre-commit run check-toml --all-files
```
#### File Quality
```bash
# Fix trailing whitespace
pre-commit run trailing-whitespace --all-files
@@ -264,6 +275,7 @@ pre-commit run end-of-file-fixer --all-files
### Pipeline Overview
The CI/CD pipeline runs automatically on:
- Push to any branch
- Pull requests to `main` or `develop`

View File

@@ -10,7 +10,7 @@ export default defineConfig({
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
workers: process.env.CI ? 1 : undefined,
reporter: 'html',
reporter: process.env.CI ? [['list'], ['junit', { outputFile: 'playwright-results.xml' }]] : 'html',
use: {
baseURL: 'http://localhost:5173',
trace: 'on-first-retry',
@@ -19,19 +19,28 @@ export default defineConfig({
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
use: {
...devices['Desktop Chrome'],
headless: process.env.CI ? true : false,
},
},
{
name: 'firefox',
use: { ...devices['Desktop Firefox'] },
use: {
...devices['Desktop Firefox'],
headless: process.env.CI ? true : false,
},
},
{
name: 'webkit',
use: { ...devices['Desktop Safari'] },
use: {
...devices['Desktop Safari'],
headless: process.env.CI ? true : false,
},
}
],
webServer: {
command: 'npm run dev',
command: 'yarn dev',
url: 'http://localhost:5173',
reuseExistingServer: !process.env.CI,
timeout: 120 * 1000,