-
-
Notifications
You must be signed in to change notification settings - Fork 173
Fix/e2e tests #1061
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
NiallJoeMaher
merged 45 commits into
codu-code:develop
from
JohnAllenTech:fix/e2e-tests
Oct 14, 2024
Merged
Fix/e2e tests #1061
Changes from all commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
909133c
chore: added all selected columns to the groupBy function
JohnAllenTech b685436
Merge branch 'develop' into fix/broken-article-query
JohnAllenTech 389acab
chore: updated drizzle orm dep and tested it works
JohnAllenTech 6649e50
fix: e2e tests back working
JohnAllenTech 3066351
fix: removing flaky part of e2e test
JohnAllenTech 94f8c72
chore: removing more flakiness
JohnAllenTech b2d088d
chore: working but still flaky
JohnAllenTech abdd4d1
chore: attempting to reuse single login across multiple tests
JohnAllenTech 489c459
chore: still not working in headless mode
JohnAllenTech 60ad7a8
Merge branch 'develop' into fix/e2e-tests
JohnAllenTech a0f3387
chore: reverted merge and added autheticated browser state to gitignore
JohnAllenTech 5cf2438
chore: removing browser.json to safeguard against people uploading th…
JohnAllenTech 9db35ca
chore: removed playwright workflow
JohnAllenTech 28098da
Merge branch 'develop' into fix/e2e-tests
JohnAllenTech 91ea958
chore: classic hackerman stuff here
JohnAllenTech 97a9545
Merge branch 'develop' into fix/e2e-tests
JohnAllenTech 8415a67
chore: removing some unused code and making the authenticated browser…
JohnAllenTech ec6172c
chore: some logging for future humans
JohnAllenTech 144a5bf
chore: nearly there. testing workflow
JohnAllenTech ed447a3
chore: updated e2e workflow to input new seed script
JohnAllenTech 9312347
chore: now logging error when browser.json fails
JohnAllenTech 7ac5ebc
chore: more logging around file creation errors
JohnAllenTech 732b6b0
chore: removed logging
JohnAllenTech 82ba182
Merge branch 'develop' into fix/e2e-tests
JohnAllenTech 86c3f68
chore: updated some naming
JohnAllenTech 6676d88
chore: now creating folder and file in workflow
JohnAllenTech f42dbf1
Merge branch 'develop' into fix/e2e-tests
NiallJoeMaher 78a03ba
chore: add more logging to file creation process
JohnAllenTech 3c8b921
chore: async file and folder creation added
JohnAllenTech e7f8d4f
chore: back to sync and more logging in folder/file creation
JohnAllenTech d62f95c
chore: removed throw errors for testing
JohnAllenTech bf7d103
chore: added hacky wait step
JohnAllenTech acf2e05
chore: new way of creating the files/folders added
JohnAllenTech e6bca18
chore: creating files successfully but module import failing
JohnAllenTech a75a83f
chore: now creating files in workflow step
JohnAllenTech 1da9338
chore: moved file/folder creation into seed step
JohnAllenTech 6154e0d
chore: removed git ignore as browser state is now fully mocked
JohnAllenTech e9fbb34
chore: now not depending on process env var
JohnAllenTech d5468c8
chore: made authenticated homepage test more robust
JohnAllenTech fbed02d
chore: replaced order of tests to see if cookies are cleared at a tes…
JohnAllenTech 5f89326
chore: now seeding e2e user in normal seed script
JohnAllenTech fc64a92
chore: cleanup before PR review
JohnAllenTech 0ae6105
Merge branch 'develop' into fix/e2e-tests
JohnAllenTech b2f994f
chore: cleaning up old script
JohnAllenTech cb662cc
chore: prettier fix
JohnAllenTech 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
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 |
---|---|---|
|
@@ -18,20 +18,20 @@ jobs: | |
initial-checks: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
fetch-depth: 0 | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
fetch-depth: 0 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 'lts/*' | ||
cache: 'npm' | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "lts/*" | ||
cache: "npm" | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
- name: Install dependencies | ||
run: npm ci | ||
|
||
e2e: | ||
needs: initial-checks | ||
|
@@ -44,66 +44,69 @@ jobs: | |
GITHUB_ID: ${{ secrets.E2E_GITHUB_ID }} | ||
GITHUB_SECRET: ${{ secrets.E2E_GITHUB_SECRET }} | ||
NEXTAUTH_SECRET: ${{ secrets.NEXTAUTH_SECRET }} | ||
E2E_USER_EMAIL: [email protected] | ||
E2E_USER_ID: 8e3179ce-f32b-4d0a-ba3b-234d66b836ad | ||
E2E_USER_SESSION_ID: df8a11f2-f20a-43d6-80a0-a213f1efedc1 | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
fetch-depth: 0 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 'lts/*' | ||
cache: 'npm' | ||
|
||
- name: Cache Playwright browsers | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.cache/ms-playwright | ||
key: ${{ runner.os }}-playwright-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-playwright- | ||
|
||
- name: Run docker-compose | ||
uses: isbang/[email protected] | ||
with: | ||
compose-file: "./docker-compose.yml" | ||
down-flags: "--volumes" | ||
services: | | ||
db | ||
|
||
- name: Wait for DB to be ready | ||
run: | | ||
timeout 60s bash -c 'until nc -z localhost 5432; do echo "Waiting for database connection..."; sleep 2; done' | ||
shell: bash | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Install Playwright browsers | ||
run: npx playwright install --with-deps | ||
if: steps.playwright-cache.outputs.cache-hit != 'true' | ||
|
||
- name: Seed database | ||
run: | | ||
npm run db:push | ||
npm run db:seed | ||
|
||
- name: Run Playwright tests | ||
id: playwright-tests | ||
run: npx playwright test | ||
continue-on-error: true | ||
|
||
- name: Upload Playwright report | ||
uses: actions/upload-artifact@v4 | ||
if: always() | ||
with: | ||
name: playwright-report | ||
path: playwright-report/ | ||
retention-days: 30 | ||
|
||
- name: Check test results | ||
if: steps.playwright-tests.outcome == 'failure' | ||
run: exit 1 | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
fetch-depth: 0 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "lts/*" | ||
cache: "npm" | ||
|
||
- name: Cache Playwright browsers | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.cache/ms-playwright | ||
key: ${{ runner.os }}-playwright-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-playwright- | ||
|
||
- name: Run docker-compose | ||
uses: isbang/[email protected] | ||
with: | ||
compose-file: "./docker-compose.yml" | ||
down-flags: "--volumes" | ||
services: | | ||
db | ||
|
||
- name: Wait for DB to be ready | ||
run: | | ||
timeout 60s bash -c 'until nc -z localhost 5432; do echo "Waiting for database connection..."; sleep 2; done' | ||
shell: bash | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Install Playwright browsers | ||
run: npx playwright install --with-deps | ||
if: steps.playwright-cache.outputs.cache-hit != 'true' | ||
|
||
- name: Seed database | ||
run: | | ||
npm run db:push | ||
npm run db:seed | ||
|
||
- name: Run Playwright tests | ||
id: playwright-tests | ||
run: npx playwright test | ||
continue-on-error: true | ||
|
||
- name: Upload Playwright report | ||
uses: actions/upload-artifact@v4 | ||
if: always() | ||
with: | ||
name: playwright-report | ||
path: playwright-report/ | ||
retention-days: 30 | ||
|
||
- name: Check test results | ||
if: steps.playwright-tests.outcome == 'failure' | ||
run: exit 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,4 +67,4 @@ ssmSetup.zsh | |
|
||
|
||
# open-next | ||
.open-next | ||
.open-next |
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.
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.
Uh oh!
There was an error while loading. Please reload this page.