-
Notifications
You must be signed in to change notification settings - Fork 0
fix: ci #1
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
Merged
fix: ci #1
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,27 +1,37 @@ | ||
| name: Playwright Tests | ||
| on: | ||
| push: | ||
| branches: [ main, master ] | ||
| branches: [main] | ||
| pull_request: | ||
| branches: [ main, master ] | ||
| branches: [main] | ||
| concurrency: | ||
| group: playwright-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| test: | ||
| timeout-minutes: 60 | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: lts/* | ||
| - name: Install dependencies | ||
| run: npm ci | ||
| - name: Install Playwright Browsers | ||
| run: npx playwright install --with-deps | ||
| - name: Run Playwright tests | ||
| run: npx playwright test | ||
| - uses: actions/upload-artifact@v4 | ||
| if: ${{ !cancelled() }} | ||
| with: | ||
| name: playwright-report | ||
| path: playwright-report/ | ||
| retention-days: 30 | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: lts/* | ||
| - name: Set up Bun | ||
| uses: oven-sh/setup-bun@v2 | ||
| - name: Install dependencies | ||
| run: bun install | ||
| - name: Install Playwright Browsers | ||
| run: bunx playwright install --with-deps | ||
| - name: Start Docker Compose | ||
| run: docker compose up -d | ||
| - name: Wait for Redis to be ready | ||
| run: sleep 10 | ||
| - name: Run Playwright tests | ||
| run: bunx playwright test | ||
| - uses: actions/upload-artifact@v4 | ||
| if: ${{ !cancelled() }} | ||
| with: | ||
| name: playwright-report | ||
| path: playwright-report/ | ||
| retention-days: 1 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| /** | ||
| * Mock OAuth callback server for e2e tests. | ||
| * This server listens on port 3001 and handles OAuth redirect callbacks. | ||
| * It simply displays the received query parameters (code, state, error, etc.) | ||
| */ | ||
|
|
||
| const server = Bun.serve({ | ||
| port: 3001, | ||
| fetch(req) { | ||
| const url = new URL(req.url); | ||
|
|
||
| if (url.pathname === "/callback") { | ||
| const params = Object.fromEntries(url.searchParams.entries()); | ||
|
|
||
| // Return an HTML page showing the callback parameters | ||
| const html = ` | ||
| <!DOCTYPE html> | ||
| <html> | ||
| <head> | ||
| <title>OAuth Callback</title> | ||
| </head> | ||
| <body> | ||
| <h1>OAuth Callback Received</h1> | ||
| <pre>${JSON.stringify(params, null, 2)}</pre> | ||
| </body> | ||
| </html>`; | ||
|
|
||
| return new Response(html, { | ||
| headers: { "Content-Type": "text/html" }, | ||
| }); | ||
| } | ||
|
|
||
| // Health check endpoint | ||
| if (url.pathname === "/health") { | ||
| return new Response("OK", { status: 200 }); | ||
| } | ||
|
|
||
| return new Response("Not Found", { status: 404 }); | ||
| }, | ||
| }); | ||
|
|
||
| console.log(`Mock OAuth callback server running on http://localhost:${server.port}`); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Artifact retention reduced from 30 days to 1 day. This significantly limits the time available to review test reports and debug failures. Consider whether 1 day provides sufficient time for investigating test failures, especially over weekends or holidays.