Skip to content

Add E2E testing and scheduled CI runs with coverage reporting#21

Open
devstefancho wants to merge 1 commit into
mainfrom
claude/setup-ci-pipeline-XG3cv
Open

Add E2E testing and scheduled CI runs with coverage reporting#21
devstefancho wants to merge 1 commit into
mainfrom
claude/setup-ci-pipeline-XG3cv

Conversation

@devstefancho
Copy link
Copy Markdown
Owner

Summary

This PR enhances the CI/CD pipeline by introducing end-to-end testing with Playwright, adding scheduled daily runs, and improving test coverage reporting in CI environments.

Key Changes

  • CI Workflow Enhancements

    • Added scheduled runs twice daily (00:00 and 12:00 UTC) for continuous validation
    • Renamed test job to unit-test for clarity
    • Split test execution: coverage collection on Linux, standard tests on other OS
    • Added coverage report artifact uploads (14-day retention)
    • Created new e2e-test job running Playwright tests on Ubuntu
    • Created new build job that depends on unit-test completion
  • E2E Testing Setup

    • Added e2e-test CI job with Playwright browser installation and test execution
    • Configured artifact uploads for Playwright HTML reports (14-day retention) and traces on failure (7-day retention)
  • Playwright Configuration

    • Enhanced playwright.config.ts with CI-aware settings:
      • Retries enabled in CI (2 retries) vs disabled locally
      • Single worker in CI for stability, parallel execution locally
      • HTML and GitHub reporters in CI, list reporter locally
      • Screenshot capture on failure and trace collection on retry
      • Added Chromium project configuration
      • Integrated web server startup with automatic reuse in local development
  • Test Scripts

    • Added test:coverage:ci script with JSON reporter for CI environments
    • Added test:e2e and test:e2e:install scripts for Playwright execution
    • Updated test:coverage script with explicit reporters
  • Build Artifacts

    • Updated .gitignore to exclude coverage reports, Playwright reports, and test results

Implementation Details

The CI pipeline now follows a three-stage approach: unit tests with coverage (Linux only), E2E tests, and build artifact generation. Coverage reports are only collected on Linux to reduce CI overhead while maintaining quality metrics. The Playwright configuration intelligently adapts to CI vs local environments, enabling faster local development while ensuring stability in CI with retries and detailed reporting.

https://claude.ai/code/session_01Nt6g9KnwBiBfXd5n7ET4sH

- Split CI into 3 jobs: unit-test (multi-OS), e2e-test (Playwright), build
- Add cron schedule to run twice daily (00:00, 12:00 UTC)
- Add Playwright webServer config for auto server startup in CI
- Add CI-specific settings: retries, traces on failure, screenshot on failure
- Add coverage JSON report generation and artifact upload
- Upload Playwright HTML report and failure traces as artifacts
- Add test:e2e, test:e2e:install, test:coverage:ci scripts to package.json
- Add coverage/, playwright-report/, test-results/ to .gitignore

https://claude.ai/code/session_01Nt6g9KnwBiBfXd5n7ET4sH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants