Skip to content

Conversation

karpikpl
Copy link
Collaborator

@karpikpl karpikpl commented Jan 4, 2025

This pull request introduces several significant changes aimed at enhancing the testing infrastructure, Docker configurations, and mocking capabilities. Below is a summary of the most important changes:

Testing Infrastructure Enhancements:

  • Added a new GitHub Actions workflow to run Playwright tests on push and pull request events for main and master branches. This includes setting up the environment, installing dependencies, and running tests. (.github/workflows/playwright.yml)
  • Introduced Playwright configuration files for both local and Docker environments to support various testing scenarios. (playwright.config.ts, playwright.docker.config.ts) [1] [2]
  • Added Playwright test scripts and dependencies to the package.json file, including test scripts for organization and enterprise scopes. (package.json) [1] [2]

Docker Configuration Updates:

  • Updated the main Dockerfile to use node:23-alpine for a smaller image size and improved efficiency. (Dockerfile)
  • Enhanced the api.Dockerfile to support different build modes (prod and playwright) and optimized the installation process by switching to apk for package management. (api.Dockerfile) [1] [2]
  • Changed the entrypoint script for Docker to use sh instead of bash for compatibility with Alpine Linux. (api/docker-entrypoint.api/entrypoint.sh)

Mocking and Logging Enhancements:

  • Implemented middleware in api/server.mjs to log requests and mock responses for specific GitHub API endpoints when APP_MOCKED_DATA is enabled. (api/server.mjs) [1] [2]
  • Moved mock data files to a dedicated mock-data directory for better organization. (src/api/ExtractSeats.ts, src/api/GitHubApi.ts) [1] [2]

Environment and Configuration Updates:

  • Updated the .dockerignore file to exclude additional directories and files related to testing and deployment. (.dockerignore)
  • Added a placeholder for SESSION_SECRET in the .env file to secure sessions when using the GitHub API proxy. (.env)

New Playwright Tests:

  • Added new Playwright tests for both organization and enterprise scopes to verify the visibility of metrics and tabs. (tests/copilot.ent.spec.ts, tests/copilot.org.spec.ts) [1] [2]

@karpikpl karpikpl requested a review from Copilot January 4, 2025 23:54
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 12 out of 21 changed files in this pull request and generated no comments.

Files not reviewed (9)
  • .dockerignore: Language not supported
  • .env: Language not supported
  • Dockerfile: Language not supported
  • api.Dockerfile: Language not supported
  • api/docker-entrypoint.api/entrypoint.sh: Language not supported
  • package.json: Language not supported
  • .github/workflows/playwright.yml: Evaluated as low risk
  • src/api/ExtractSeats.ts: Evaluated as low risk
  • src/api/GitHubApi.ts: Evaluated as low risk

@karpikpl karpikpl marked this pull request as ready for review January 5, 2025 00:12
This was referenced Jan 5, 2025
@karpikpl karpikpl merged commit 495fcfc into main Jan 11, 2025
5 checks passed
@karpikpl karpikpl deleted the playwright-alpine branch January 13, 2025 16:57
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