-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat: add GitHub Actions for Cypress tests and code quality checks #101
Open
wawrzonnn
wants to merge
55
commits into
main
Choose a base branch
from
feat/github-actions
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 54 commits
Commits
Show all changes
55 commits
Select commit
Hold shift + click to select a range
6790bbd
feat: add GitHub Actions for Cypress tests and code quality checks
wawrzonnn 6ec336b
fix: correct image path to check github actions
wawrzonnn 1ece951
fix: update path to logo img
wawrzonnn 6452a90
refactor: changed images paths to public directory
wawrzonnn 0a185e1
fix: updated profile picture path
wawrzonnn a76312d
fix: removed lint staged from G-A workflow
wawrzonnn 4091f8d
ci: temporarily removed build step in github actions
wawrzonnn ea0564e
fix: changed github variables names
wawrzonnn 7994269
feat: added ghsecret and gh id to ci.yml
wawrzonnn c2df80d
fix: testing commit
wawrzonnn 92f7e14
feat: clean up and add prisma secret
wawrzonnn 6782697
fix: testing commit
wawrzonnn c122591
fix: testing commit
wawrzonnn 61dbd44
fix: testing commit
wawrzonnn 2ed565b
fix: testing
wawrzonnn 7ac8bf4
fix: testingowo CC
wawrzonnn c36c693
fix: test
wawrzonnn 18a940c
fix: asd
wawrzonnn 18a23e4
fix: asd
wawrzonnn 6ea69d0
fix: asdf
wawrzonnn c860069
fix: testing
wawrzonnn 1b0783b
fix: tesstingowo
wawrzonnn 5bac2fa
fix: test
wawrzonnn b42c11d
fix: test
wawrzonnn 0e3f294
fix: fix
wawrzonnn d69de5a
fix: fix
wawrzonnn 97be799
fix: fixed
wawrzonnn 9e28f3d
fix: fix
wawrzonnn 9144ea1
fix: fix
wawrzonnn c316e99
Merge branch 'main' into feat/github-actions
wawrzonnn 9ecc28b
feat: added new session token
wawrzonnn 98b6b83
fix: added ts-node
wawrzonnn cdc65cc
fix: changed homepage url
wawrzonnn 24cb14e
fix: fixed ci.yml
wawrzonnn 7d65025
fix: fix
wawrzonnn 8a16475
fix: fix
wawrzonnn fead73f
fix: fix
wawrzonnn d1eac4b
fix: fix
wawrzonnn 69e6709
fix: fix
wawrzonnn f51577e
fix: fix
wawrzonnn 7edd61d
fix: fix
wawrzonnn e2a1287
fix: added bigger timeout for 1st test to find out if there's a need …
szymonkadas a6b7f5e
fix: Update ci.yml, deleted & from npm run start
szymonkadas 400ed73
fix: Update ci.yml revert
szymonkadas 120dd92
fix: Update ci.yml
szymonkadas 058a413
fix: renamed env variables in next.config.js to match env vars
szymonkadas bba0354
fix: changed next congig env vars to match exactly env vars
szymonkadas 987f846
fix: changed env vars assigned to next config env
szymonkadas 6fc5b03
fix: env vars in next config completely resemble true env
szymonkadas 9338602
fix: Update ci.yml
szymonkadas 606de87
fix: Update ci.yml
szymonkadas 49b017a
fix: Update ci.yml
szymonkadas c13e4ab
fix: trying to downgrade cypress to fix gh tests
szymonkadas 169dc6c
Merge branch 'feat/github-actions' of https://github.com/nerdbord/goo…
szymonkadas f40ab24
fix: clean up
wawrzonnn 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 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,44 @@ | ||
name: test | ||
on: push | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
services: | ||
postgres: | ||
image: postgres | ||
env: | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: postgres | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
ports: | ||
- 5432:5432 | ||
env: | ||
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/fastify-graphql | ||
POSTGRES_PRISMA_URL: postgres://default:59TfFQZnKCtb@ep-misty-heart-03592629-pooler.eu-central-1.postgres.vercel-storage.com/verceldb?pgbouncer=true&connect_timeout=15 | ||
POSTGRES_URL_NON_POOLING: postgres://default:59TfFQZnKCtb@ep-misty-heart-03592629.eu-central-1.postgres.vercel-storage.com/verceldb | ||
SESSION_TOKEN: eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2R0NNIn0..jDmIf9G9weIEzGAQ.rXS-wIeDhto_3f7nwSFi3aQ3oKYTm6pt9mnPhDZf4_QQkL4CqfYVKIXamfyncqJXb96y1n4SBcmaMKzP9OlGfg-Eg196LJv3X8tyKv-CU8jHUJn7EBmNn_rRe-0lYHa2dXGPm9VWB4fMIxgpgYq0UCmxjEkLT0XtG0_uTj6aF3Ncltc0roN9Wxgp5NTZneWjRA9oDCYh6roNwVFNW18yGOERaZGdlJ7Kbvrz4dqijTC8ZDNfx1aTCbyWWXoUnw4O508LkIitydydyPIetDSBQmuEnFC-sqSHvtgAcuDoLqT8jUn6kwjYS8I9VeZjh1pP2-DsSFlKZFOUfjh9-cF8P094RTmF-oJlsQargh4dHaPoU9UtzS8mQpJqcU6xLcaKBadBAR4FlN4PV9yFzqcJP63dI6YMKhZ3jrz1_bW3K-t4WPz62qu2_Smx1Qsm7GY.bCzl_T5-xTO2bPemyKjQgA | ||
GITHUB_ID: eaab0c61bc73d9058e8c | ||
GITHUB_SECRET: 680323612e33335e885b06037b9b6d9d51446718 | ||
TERM: xterm | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18' | ||
- run: npm install --force | ||
- run: npm run build | ||
- run: npx prisma migrate reset --force | ||
- run: npm run start & | ||
- run: npx wait-on http://localhost:3000 | ||
# - run: npx wait-on 'http://[::1]:3000 | ||
- run: npm run cypress:run | ||
|
||
- uses: actions/upload-artifact@v3 | ||
if: failure() | ||
with: | ||
name: cypress-screenshots | ||
path: cypress/screenshots/ |
This file contains 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 |
---|---|---|
|
@@ -12,5 +12,5 @@ const DashboardPage = () => { | |
</ModerationFilterContextProvider> | ||
) | ||
} | ||
|
||
// elo | ||
export default DashboardPage |
This file contains 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 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,16 @@ | ||
import { NextRequest, NextResponse } from 'next/server' | ||
import { deleteUserProfileByEmail } from '@/backend/profile/profile.service' | ||
import { authorizeUser } from '@/lib/auth' | ||
|
||
export async function DELETE(request: NextRequest) { | ||
try { | ||
const { email } = await authorizeUser() | ||
|
||
await deleteUserProfileByEmail(email) | ||
|
||
return new NextResponse('Misior has left the game', { status: 200 }) | ||
} catch (error) { | ||
console.log('Error:', error) | ||
return new NextResponse(`${error}`, { status: 500 }) | ||
} | ||
} |
This file contains 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 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 |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
"user": { | ||
"name": "Myś Krzysiorny", | ||
"email": "[email protected]", | ||
"image": "misor.jpg" | ||
"image": "/misor.jpg" | ||
}, | ||
"expires": "3000-01-01T00:00:00.000Z", | ||
"accessToken": "abcdefghijklmnopqrst" | ||
|
This file contains 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.
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.
nitpick: Why
/test
path - we should add it normally in/api/profile/route.ts