-
-
Notifications
You must be signed in to change notification settings - Fork 2
GitHub Actions workflow for Cypress tests #181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
04cab5b to
46f9b2f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds GitHub Actions workflow support for running Cypress component tests in Docker containers, enabling automated testing in a consistent, isolated environment.
Key Changes:
- New GitHub Actions job for Cypress tests with Docker-based test execution
- Docker configuration files (Dockerfile, Dockerfile.cypress, docker-compose.yml) for containerized test environment
- Dependency updates for Cypress (15.7.1 → 15.8.2) and related packages
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/dev.yml | Adds new cypress-tests job with Docker build, health checks, and test execution steps |
| src/renderer/Dockerfile | Creates Node.js-based image for running Vite dev server with app dependencies |
| src/renderer/Dockerfile.cypress | Creates Cypress container image with testing dependencies |
| src/renderer/docker-compose.yml | Defines multi-service Docker setup for app and Cypress test containers |
| src/renderer/package.json | Adds Docker-related npm scripts for running tests in containers |
| src/renderer/package-lock.json | Updates Cypress and related dependencies to newer versions |
| src/renderer/vite.config.ts | Adds optimizeDeps configuration with comments explaining caching behavior |
| .dockerignore | Excludes unnecessary files from root Docker context |
| src/renderer/.dockerignore | Excludes unnecessary files from renderer Docker context |
Files not reviewed (1)
- src/renderer/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- launchs a custom version of the dev server with the latest packages for vite testing - sets the vite optimize deps so it is not run during tests - tests are run in a docker instance - write was added to packages.json to support running stamp - npm run cy:docker:build - sets up containers ... reloads dependencies - npm run cy:docker - runs tests each time - npm run cy:docker:down - removes containers and network - add docker cypress tests to github actions - add docker clean up - aggressive agent clean up for docker - separate cypress tests into their own job - Updated the job to build the Docker image and start the container directly, enhancing efficiency. - Added a wait step to ensure the application is ready before running Cypress tests. - Modified cleanup steps to stop and remove the Docker container after tests, ensuring a clean environment. - Changed the working directory to /app/src/renderer for the renderer`s Vite dev server. - Updated the comment to specify that the command runs the Vite dev server instead of the full Electron app. - Added a step to create an index.html file with environment variables for the Vite application. - Implemented a verification step to check for the existence of necessary environment files before building the Docker image. - Improved logging for container status and logs during the application startup process to aid in debugging. - Introduced a new step to run Vite optimization for Cypress tests before executing the tests, improving test performance and reliability. - Add step to install root dependencies and stamp build with date and time
Uh oh!
There was an error while loading. Please reload this page.