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
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:
@@ -405,11 +405,13 @@ jobs:
|
|||||||
- name: Run E2E tests
|
- name: Run E2E tests
|
||||||
run: |
|
run: |
|
||||||
docker pull dogar.darkhelm.org/darkhelm.org/plex-playlist/cicd:${GITHUB_SHA:-latest}
|
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 &&
|
cd /workspace/frontend &&
|
||||||
if [ -d 'tests/e2e' ] || grep -q 'playwright' package.json; then
|
if [ -d 'tests/e2e' ] || grep -q 'playwright' package.json; then
|
||||||
echo 'Running E2E tests with Playwright...' &&
|
echo 'Running E2E tests with Playwright...' &&
|
||||||
yarn test:e2e
|
export CI=true &&
|
||||||
|
export NODE_ENV=test &&
|
||||||
|
yarn playwright test --reporter=list --headed=false
|
||||||
else
|
else
|
||||||
echo 'ℹ No E2E tests found'
|
echo 'ℹ No E2E tests found'
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -235,13 +235,23 @@ yarn test
|
|||||||
# Run unit tests with coverage
|
# Run unit tests with coverage
|
||||||
yarn test:coverage
|
yarn test:coverage
|
||||||
|
|
||||||
# Run E2E tests
|
# Run E2E tests (Playwright)
|
||||||
yarn test:e2e
|
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
|
### Project-wide Tools
|
||||||
|
|
||||||
#### YAML/TOML Validation
|
#### YAML/TOML Validation
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Check YAML files
|
# Check YAML files
|
||||||
pre-commit run check-yaml --all-files
|
pre-commit run check-yaml --all-files
|
||||||
@@ -251,6 +261,7 @@ pre-commit run check-toml --all-files
|
|||||||
```
|
```
|
||||||
|
|
||||||
#### File Quality
|
#### File Quality
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Fix trailing whitespace
|
# Fix trailing whitespace
|
||||||
pre-commit run trailing-whitespace --all-files
|
pre-commit run trailing-whitespace --all-files
|
||||||
@@ -264,6 +275,7 @@ pre-commit run end-of-file-fixer --all-files
|
|||||||
### Pipeline Overview
|
### Pipeline Overview
|
||||||
|
|
||||||
The CI/CD pipeline runs automatically on:
|
The CI/CD pipeline runs automatically on:
|
||||||
|
|
||||||
- Push to any branch
|
- Push to any branch
|
||||||
- Pull requests to `main` or `develop`
|
- Pull requests to `main` or `develop`
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ export default defineConfig({
|
|||||||
forbidOnly: !!process.env.CI,
|
forbidOnly: !!process.env.CI,
|
||||||
retries: process.env.CI ? 2 : 0,
|
retries: process.env.CI ? 2 : 0,
|
||||||
workers: process.env.CI ? 1 : undefined,
|
workers: process.env.CI ? 1 : undefined,
|
||||||
reporter: 'html',
|
reporter: process.env.CI ? [['list'], ['junit', { outputFile: 'playwright-results.xml' }]] : 'html',
|
||||||
use: {
|
use: {
|
||||||
baseURL: 'http://localhost:5173',
|
baseURL: 'http://localhost:5173',
|
||||||
trace: 'on-first-retry',
|
trace: 'on-first-retry',
|
||||||
@@ -19,19 +19,28 @@ export default defineConfig({
|
|||||||
projects: [
|
projects: [
|
||||||
{
|
{
|
||||||
name: 'chromium',
|
name: 'chromium',
|
||||||
use: { ...devices['Desktop Chrome'] },
|
use: {
|
||||||
|
...devices['Desktop Chrome'],
|
||||||
|
headless: process.env.CI ? true : false,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'firefox',
|
name: 'firefox',
|
||||||
use: { ...devices['Desktop Firefox'] },
|
use: {
|
||||||
|
...devices['Desktop Firefox'],
|
||||||
|
headless: process.env.CI ? true : false,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'webkit',
|
name: 'webkit',
|
||||||
use: { ...devices['Desktop Safari'] },
|
use: {
|
||||||
|
...devices['Desktop Safari'],
|
||||||
|
headless: process.env.CI ? true : false,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
webServer: {
|
webServer: {
|
||||||
command: 'npm run dev',
|
command: 'yarn dev',
|
||||||
url: 'http://localhost:5173',
|
url: 'http://localhost:5173',
|
||||||
reuseExistingServer: !process.env.CI,
|
reuseExistingServer: !process.env.CI,
|
||||||
timeout: 120 * 1000,
|
timeout: 120 * 1000,
|
||||||
|
|||||||
Reference in New Issue
Block a user