Skip to content
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
wants to merge 55 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 29 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 Dec 12, 2023
6ec336b
fix: correct image path to check github actions
wawrzonnn Dec 12, 2023
1ece951
fix: update path to logo img
wawrzonnn Dec 12, 2023
6452a90
refactor: changed images paths to public directory
wawrzonnn Dec 12, 2023
0a185e1
fix: updated profile picture path
wawrzonnn Dec 12, 2023
a76312d
fix: removed lint staged from G-A workflow
wawrzonnn Dec 12, 2023
4091f8d
ci: temporarily removed build step in github actions
wawrzonnn Dec 12, 2023
ea0564e
fix: changed github variables names
wawrzonnn Dec 13, 2023
7994269
feat: added ghsecret and gh id to ci.yml
wawrzonnn Dec 13, 2023
c2df80d
fix: testing commit
wawrzonnn Dec 13, 2023
92f7e14
feat: clean up and add prisma secret
wawrzonnn Dec 13, 2023
6782697
fix: testing commit
wawrzonnn Dec 13, 2023
c122591
fix: testing commit
wawrzonnn Dec 13, 2023
61dbd44
fix: testing commit
wawrzonnn Dec 13, 2023
2ed565b
fix: testing
wawrzonnn Dec 13, 2023
7ac8bf4
fix: testingowo CC
wawrzonnn Dec 14, 2023
c36c693
fix: test
wawrzonnn Dec 14, 2023
18a940c
fix: asd
wawrzonnn Dec 14, 2023
18a23e4
fix: asd
wawrzonnn Dec 14, 2023
6ea69d0
fix: asdf
wawrzonnn Dec 14, 2023
c860069
fix: testing
wawrzonnn Dec 14, 2023
1b0783b
fix: tesstingowo
wawrzonnn Dec 14, 2023
5bac2fa
fix: test
wawrzonnn Dec 14, 2023
b42c11d
fix: test
wawrzonnn Dec 14, 2023
0e3f294
fix: fix
wawrzonnn Dec 14, 2023
d69de5a
fix: fix
wawrzonnn Dec 15, 2023
97be799
fix: fixed
wawrzonnn Dec 15, 2023
9e28f3d
fix: fix
wawrzonnn Dec 15, 2023
9144ea1
fix: fix
wawrzonnn Dec 15, 2023
c316e99
Merge branch 'main' into feat/github-actions
wawrzonnn Dec 15, 2023
9ecc28b
feat: added new session token
wawrzonnn Dec 17, 2023
98b6b83
fix: added ts-node
wawrzonnn Dec 17, 2023
cdc65cc
fix: changed homepage url
wawrzonnn Dec 17, 2023
24cb14e
fix: fixed ci.yml
wawrzonnn Dec 17, 2023
7d65025
fix: fix
wawrzonnn Dec 17, 2023
8a16475
fix: fix
wawrzonnn Dec 17, 2023
fead73f
fix: fix
wawrzonnn Dec 17, 2023
d1eac4b
fix: fix
wawrzonnn Dec 17, 2023
69e6709
fix: fix
wawrzonnn Dec 17, 2023
f51577e
fix: fix
wawrzonnn Dec 17, 2023
7edd61d
fix: fix
wawrzonnn Dec 17, 2023
e2a1287
fix: added bigger timeout for 1st test to find out if there's a need …
szymonkadas Dec 18, 2023
a6b7f5e
fix: Update ci.yml, deleted & from npm run start
szymonkadas Dec 19, 2023
400ed73
fix: Update ci.yml revert
szymonkadas Dec 19, 2023
120dd92
fix: Update ci.yml
szymonkadas Dec 19, 2023
058a413
fix: renamed env variables in next.config.js to match env vars
szymonkadas Dec 19, 2023
bba0354
fix: changed next congig env vars to match exactly env vars
szymonkadas Dec 19, 2023
987f846
fix: changed env vars assigned to next config env
szymonkadas Dec 19, 2023
6fc5b03
fix: env vars in next config completely resemble true env
szymonkadas Dec 19, 2023
9338602
fix: Update ci.yml
szymonkadas Dec 19, 2023
606de87
fix: Update ci.yml
szymonkadas Dec 19, 2023
49b017a
fix: Update ci.yml
szymonkadas Dec 19, 2023
c13e4ab
fix: trying to downgrade cypress to fix gh tests
szymonkadas Dec 19, 2023
169dc6c
Merge branch 'feat/github-actions' of https://github.com/nerdbord/goo…
szymonkadas Dec 19, 2023
f40ab24
fix: clean up
wawrzonnn Jan 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# .github/workflows/test.yaml
name: test
on: push
jobs:
test:
runs-on: ubuntu-latest
# Service containers to run with `container-job`
services:
# Label used to access the service container
postgres:
# Docker Hub PostgreSQL image
image: postgres
# Provide the password for postgres
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
# Maps tcp port 5432 on service container to the host
- 5432:5432
env:
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/fastify-graphql
POSTGRES_PRISMA_URL: ${{ secrets.POSTGRES_PRISMA_URL }}
POSTGRES_URL_NON_POOLING: ${{ secrets.POSTGRES_URL_NON_POOLING }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '18'
- run: npm install --force
- run: npm run build
# Create the database
- run: npx prisma migrate deploy
- run: npm run start &
- run: npm run cypress:run
2 changes: 1 addition & 1 deletion app/(moderation)/dashboard/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ const DashboardPage = () => {
</ModerationFilterContextProvider>
)
}

// elo
export default DashboardPage
3 changes: 0 additions & 3 deletions app/api/profiles/[id]/state/route.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import { updateUserData } from '@/backend/profile/profile.service'
import { findUserByEmail } from '@/backend/user/user.service'
import { PublishingStateData } from '@/data/frontend/profile/types'
import { authOptions } from '@/lib/auth'
import { requireUserRoles } from '@/utils/auths'
import { Role } from '@prisma/client'
import { getServerSession } from 'next-auth'
import { NextRequest, NextResponse } from 'next/server'

export async function PATCH(
Expand Down
4 changes: 2 additions & 2 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ const nextConfig = {
module.exports = {
...nextConfig,
env: {
GITHUB_ID: process.env.GITHUB_ID,
GITHUB_SECRET: process.env.GITHUB_SECRET,
GH_CLIENT_ID: process.env.GH_CLIENT_ID,
GH_CLIENT_SECRET: process.env.GH_CLIENT_SECRET,
},
images: {
domains: [
Expand Down
Loading
Loading