From c5eeedb31d36fbbb128a581d947427457b0f564f Mon Sep 17 00:00:00 2001 From: Hendrik Belitz Date: Fri, 25 Jul 2025 12:25:00 +0200 Subject: [PATCH] 53 Set env vars for tests and build in github actions --- .github/workflows/main-deploy.yml | 16 ++++++++++++++++ .github/workflows/pr-checks.yml | 16 ++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/.github/workflows/main-deploy.yml b/.github/workflows/main-deploy.yml index c53b91d..b7bd900 100644 --- a/.github/workflows/main-deploy.yml +++ b/.github/workflows/main-deploy.yml @@ -29,11 +29,27 @@ jobs: - name: Run unit tests run: npm run test:unit -- --run + env: + DATABASE_URL: "postgresql://test:test@localhost:5432/test" + SMTP_HOST: "smtp.example.com" + SMTP_PORT: "587" + SMTP_SECURE: "false" + SMTP_USER: "your-email@example.com" + SMTP_PASS: "your-password" + SMTP_FROM_NAME: "Open Reception" + SMTP_FROM_EMAIL: "noreply@example.com" - name: Build application run: npm run build env: DATABASE_URL: "postgresql://test:test@localhost:5432/test" + SMTP_HOST: "smtp.example.com" + SMTP_PORT: "587" + SMTP_SECURE: "false" + SMTP_USER: "your-email@example.com" + SMTP_PASS: "your-password" + SMTP_FROM_NAME: "Open Reception" + SMTP_FROM_EMAIL: "noreply@example.com" - name: Install Playwright browsers run: npx playwright install --with-deps diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml index ba1bcfe..a621553 100644 --- a/.github/workflows/pr-checks.yml +++ b/.github/workflows/pr-checks.yml @@ -30,8 +30,24 @@ jobs: - name: Run unit tests run: npm run test:unit -- --run + env: + DATABASE_URL: "postgresql://test:test@localhost:5432/test" + SMTP_HOST: "smtp.example.com" + SMTP_PORT: "587" + SMTP_SECURE: "false" + SMTP_USER: "your-email@example.com" + SMTP_PASS: "your-password" + SMTP_FROM_NAME: "Open Reception" + SMTP_FROM_EMAIL: "noreply@example.com" - name: Build application run: npm run build env: DATABASE_URL: "postgresql://test:test@localhost:5432/test" + SMTP_HOST: "smtp.example.com" + SMTP_PORT: "587" + SMTP_SECURE: "false" + SMTP_USER: "your-email@example.com" + SMTP_PASS: "your-password" + SMTP_FROM_NAME: "Open Reception" + SMTP_FROM_EMAIL: "noreply@example.com"