Compare commits

..

1 commit

Author SHA1 Message Date
5166fa6cc4 chore: Add some tests
Some checks failed
Pull Request Labeler / labeler (pull_request_target) Successful in 17s
CI / Get Changed Files (pull_request) Successful in 28s
Label PRs based on size / Check PR size (pull_request) Successful in 27s
Claude PR Review / claude-code (pull_request) Successful in 47s
CI / oxlint (pull_request) Successful in 31s
CI / eslint (pull_request) Successful in 43s
CI / prettier (pull_request) Successful in 52s
CI / Docker frontend validation (pull_request) Successful in 1m26s
CI / test-build (pull_request) Successful in 1m31s
CI / Checkstyle Main (pull_request) Successful in 1m56s
CI / Backend Tests (pull_request) Successful in 3m1s
CI / Docker backend validation (pull_request) Successful in 3m17s
CI / Playwright (pull_request) Failing after 6m43s
2025-06-05 11:31:35 +02:00
4 changed files with 62 additions and 2 deletions

View file

@ -197,12 +197,13 @@ jobs:
bun install
- uses: actions/setup-node@v4
with:
node-version: 22
node-version: 22.12
- run: bunx playwright install --with-deps
working-directory: ./frontend
- name: Run Playwright tests
env:
CI: true
SPRING_PROFILES_ACTIVE: inmemory
working-directory: ./frontend
run: source $HOME/.cargo/env && bunx playwright test

View file

@ -55,6 +55,7 @@ dependencies {
runtimeOnly("io.jsonwebtoken:jjwt-impl:0.12.6")
runtimeOnly("io.jsonwebtoken:jjwt-jackson:0.12.6")
implementation("org.springframework.boot:spring-boot-starter-mail")
runtimeOnly("com.h2database:h2")
}
tasks.withType<Test> {

View file

@ -0,0 +1,58 @@
spring.datasource.url=jdbc:h2:mem:testdb;DB_CLOSE_DELAY=-1
spring.datasource.driverClassName=org.h2.Driver
spring.datasource.username=sa
spring.datasource.password=
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
spring.jpa.hibernate.ddl-auto=create-drop
server.port=${HTTP_PORT:8080}
stripe.secret.key=${STRIPE_SECRET_KEY:sk_test_51QrePYIvCfqz7ANgqam8rEwWcMeKiLOof3j6SCMgu2sl4sESP45DJxca16mWcYo1sQaiBv32CMR6Z4AAAGQPCJo300ubuZKO8I}
stripe.webhook.secret=${STRIPE_WEBHOOK_SECRET:whsec_746b6a488665f6057118bdb4a2b32f4916f16c277109eeaed5e8f8e8b81b8c15}
app.frontend-host=${FE_URL:http://localhost:4200}
app.mail.authentication=${MAIL_AUTHENTICATION:false}
app.mail.host=${MAIL_HOST:localhost}
app.mail.port=${MAIL_PORT:1025}
app.mail.username=${MAIL_USER:null}
app.mail.password=${MAIL_PASS:null}
app.mail.from-address=${MAIL_FROM:casino@localhost}
app.mail.protocol=${MAIL_PROTOCOL:smtp}
spring.application.name=casino
# JWT Configuration
jwt.secret=${JWT_SECRET:5367566B59703373367639792F423F4528482B4D6251655468576D5A71347437}
jwt.expiration.ms=${JWT_EXPIRATION_MS:86400000}
# Logging
logging.level.org.springframework.security=DEBUG
# Swagger
springdoc.swagger-ui.path=swagger
springdoc.swagger-ui.try-it-out-enabled=true
# GitHub OAuth2 Configuration
spring.security.oauth2.client.registration.github.client-id=${GITHUB_CLIENT_ID:Ov23lingzZsPn1wwACoK}
spring.security.oauth2.client.registration.github.client-secret=${GITHUB_CLIENT_SECRET:4b327fb3b1ab67584a03bcb9d53fa6439fbccad7}
spring.security.oauth2.client.registration.github.redirect-uri=${app.frontend-host}/oauth2/callback/github
spring.security.oauth2.client.registration.github.scope=user:email,read:user
spring.security.oauth2.client.provider.github.authorization-uri=https://github.com/login/oauth/authorize
spring.security.oauth2.client.provider.github.token-uri=https://github.com/login/oauth/access_token
spring.security.oauth2.client.provider.github.user-info-uri=https://api.github.com/user
spring.security.oauth2.client.provider.github.user-name-attribute=login
# OAuth Success and Failure URLs
app.oauth2.authorizedRedirectUris=${app.frontend-host}/auth/oauth2/callback
# Google OAuth2 Configuration
spring.security.oauth2.client.registration.google.client-id=${GOOGLE_CLIENT_ID:350791038883-c1r7v4o793itq8a0rh7dut7itm7uneam.apps.googleusercontent.com}
spring.security.oauth2.client.registration.google.client-secret=${GOOGLE_CLIENT_SECRET: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}
spring.security.oauth2.client.registration.google.redirect-uri=${app.frontend-host}/oauth2/callback/google
spring.security.oauth2.client.registration.google.scope=email,profile
spring.security.oauth2.client.provider.google.authorization-uri=https://accounts.google.com/o/oauth2/v2/auth
spring.security.oauth2.client.provider.google.token-uri=https://oauth2.googleapis.com/token
spring.security.oauth2.client.provider.google.user-info-uri=https://www.googleapis.com/oauth2/v3/userinfo
spring.security.oauth2.client.provider.google.user-name-attribute=sub

View file

@ -32,7 +32,7 @@ export default defineConfig({
webServer: {
command:
'cd .. && conc -n "frontend,backend,docker" "cd frontend && bun run start" "cd backend/ && sleep 15 && watchexec -r -e java ./gradlew :bootRun" "docker compose up"',
'cd .. && conc -n "frontend,backend" "cd frontend && bun run start" "cd backend/ && watchexec -r -e java ./gradlew :bootRun"',
// **IMPORTANT CHANGE HERE:**
// Point to your backend's health check endpoint.
// If your Spring Boot app uses Actuator, it might be /actuator/health