Solves Github actions caching issues (#7431)
* Create env file workflow * Add env-cache * Fix env setter * Fix * Another fix * Fix * Fix * Fixes * FFS * Fix * Fix * Fix * Fix * Fix * Cache fixes * Fixes * Adds skipping steps * db-cache fixes * Test * Cache fixes * e2e * Possible caching conflicts * Running out of ideas * Caching is hard * One more time * cache-build not skipping * Fingers crossed * a * Test * Pls * Please * LFG * Build fix * fix * Whitespace!! * Zomars/cal 884 paid events not sending the link (#7318) * WIP * Sends correct emails for paid bookings * Update PaymentService.ts * Update webhook.ts * Update webhook.ts * Update settings back button redirect link (#7403) * fix(schedule): close on click #7143 * fix(EventSetupTab): validLocations length will always match validLocations length #7138 * fix(SettingsLayout): go back to right route #7379 * feat: get country code from ip geolocation (#6880) * feat: get coutnry code from ip geolocation Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> * fix: create new api route for fetching code Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> * chore: replace city with country Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> * refactor: create hook for country Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> --------- Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> * Team Workflows (#7038) Co-authored-by: Hariom Balhara <hariombalhara@gmail.com> Co-authored-by: CarinaWolli <wollencarina@gmail.com> Co-authored-by: zomars <zomars@me.com> Co-authored-by: Peer Richelsen <peeroke@gmail.com> * Add destination calendar name to DestinationCalendarSelector (#6701) * Add destination calendar name * Type fix * Search through calendars only for destination calendar credential * Refactor get connected calendars * Clean up --------- Co-authored-by: zomars <zomars@me.com> * Update viewer.tsx (#7428) * Fix - add team members to emails (#7207) * On booking add team members & translation * Add team members to round robin create * Only update calendars on reschedule if there is a calendar reference * Send email on reschedules * Send team email on cancelled event * Add team members to calendar event description * Clean up * Convert other emails to organizer & teams * Type check fixes * More type fixes * Change organizer scheduled input to an object * early return updateCalendarEvent * Introduce team member type * Fix type errors * Put team members before attendees * Remove lodash cloneDeep * Update packages/core/EventManager.ts Co-authored-by: Omar López <zomars@me.com> * Remove booking select object * Revert "Remove booking select object" This reverts commit 9f121ff4ebbaec9a0643111f96c5337b930ddd5b. * Refactor email manager (#7270) Co-authored-by: zomars <zomars@me.com> * Type change * Remove conditional check for updateAllCalendarEvents --------- Co-authored-by: zomars <zomars@me.com> * Typefix * Updates webhook response * Update pr.yml --------- Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> Co-authored-by: Esaú Morais <55207584+esau-morais@users.noreply.github.com> Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com> Co-authored-by: Carina Wollendorfer <30310907+CarinaWolli@users.noreply.github.com> Co-authored-by: Hariom Balhara <hariombalhara@gmail.com> Co-authored-by: CarinaWolli <wollencarina@gmail.com> Co-authored-by: Peer Richelsen <peeroke@gmail.com> Co-authored-by: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com>
This commit is contained in:
@@ -1,22 +1,26 @@
|
|||||||
name: Cache production build binaries
|
name: Cache production build binaries
|
||||||
description: "Cache or restore if necessary"
|
description: "Cache or restore if necessary"
|
||||||
env:
|
inputs:
|
||||||
node_version: v16.x
|
node_version:
|
||||||
|
required: false
|
||||||
|
default: v16.x
|
||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
- name: Cache production build
|
- name: Cache production build
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
|
id: cache-build
|
||||||
env:
|
env:
|
||||||
cache-name: prod-build
|
cache-name: prod-build
|
||||||
key-1: ${{ env.node_version }}-${{ hashFiles('yarn.lock') }}
|
key-1: ${{ inputs.node_version }}-${{ hashFiles('yarn.lock') }}
|
||||||
key-2: ${{ hashFiles('apps/web/next.config.js') }}
|
key-2: ${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
|
||||||
key-3: ${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
|
key-3: ${{ github.event.pull_request.number || github.ref }}
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
${{ github.workspace }}/apps/web/.next/cache
|
${{ github.workspace }}/apps/web/.next
|
||||||
**/.turbo/**
|
**/.turbo/**
|
||||||
**/dist/**
|
**/dist/**
|
||||||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ env.key-1 }}-${{ env.key-2 }}-${{ env.key-3 }}-${{ github.sha }}
|
key: ${{ runner.os }}-${{ env.cache-name }}-${{ env.key-1 }}-${{ env.key-2 }}-${{ env.key-3 }}
|
||||||
restore-keys: |
|
- run: yarn build
|
||||||
${{ runner.os }}-${{ env.cache-name }}-${{ env.key-1 }}-${{ env.key-2 }}-${{ env.key-3 }}-
|
if: steps.cache-build.outputs.cache-hit != 'true'
|
||||||
|
shell: bash
|
||||||
|
|||||||
@@ -2,7 +2,8 @@ name: Cache database between jobs
|
|||||||
description: "Cache or restore if necessary"
|
description: "Cache or restore if necessary"
|
||||||
inputs:
|
inputs:
|
||||||
DATABASE_URL:
|
DATABASE_URL:
|
||||||
required: true
|
required: false
|
||||||
|
default: "postgresql://postgres:@localhost:5432/calendso"
|
||||||
path:
|
path:
|
||||||
required: false
|
required: false
|
||||||
default: "backups/backup.sql"
|
default: "backups/backup.sql"
|
||||||
@@ -14,11 +15,15 @@ runs:
|
|||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
env:
|
env:
|
||||||
cache-name: cache-db
|
cache-name: cache-db
|
||||||
|
key-1: ${{ hashFiles('packages/prisma/schema.prisma','packages/prisma/migrations/**.sql','packages/prisma/*.ts') }}
|
||||||
with:
|
with:
|
||||||
path: ${{ inputs.path }}
|
path: ${{ inputs.path }}
|
||||||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ inputs.path }}-${{ github.sha }}
|
key: ${{ runner.os }}-${{ env.cache-name }}-${{ inputs.path }}-${{ env.key-1 }}-${{ github.sha }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-${{ env.cache-name }}-${{ inputs.path }}-${{ github.sha }}
|
${{ runner.os }}-${{ env.cache-name }}-${{ inputs.path }}-${{ env.key-1 }}-${{ github.sha }}
|
||||||
|
- run: yarn db-seed
|
||||||
|
if: steps.cache-db.outputs.cache-hit != 'true'
|
||||||
|
shell: bash
|
||||||
- name: Postgres Dump Backup
|
- name: Postgres Dump Backup
|
||||||
if: steps.cache-db.outputs.cache-hit != 'true'
|
if: steps.cache-db.outputs.cache-hit != 'true'
|
||||||
uses: tj-actions/pg-dump@v2.3
|
uses: tj-actions/pg-dump@v2.3
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
name: "Set environment variables"
|
||||||
|
description: "Configures environment variables for a workflow"
|
||||||
|
runs:
|
||||||
|
using: "composite"
|
||||||
|
steps:
|
||||||
|
- name: Create env file
|
||||||
|
uses: actions/cache@v3
|
||||||
|
id: env-cache
|
||||||
|
with:
|
||||||
|
path: gh.env
|
||||||
|
key: env-cache-${{ hashFiles('gh.env') }}
|
||||||
|
restore-keys: env-cache-
|
||||||
|
- name: Set Environment Variables
|
||||||
|
if: steps.env-cache.outputs.cache-hit == 'true'
|
||||||
|
uses: tw3lveparsecs/github-actions-setvars@latest
|
||||||
|
with:
|
||||||
|
envFilePath: gh.env
|
||||||
|
- name: Set Environment Variables
|
||||||
|
if: steps.env-cache.outputs.cache-hit != 'true'
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
echo "You need to run env-create-file first"
|
||||||
|
exit 1
|
||||||
@@ -1,105 +0,0 @@
|
|||||||
name: Production Build
|
|
||||||
description: "Creates a production build, caches it and restores if necessary"
|
|
||||||
inputs:
|
|
||||||
DATABASE_URL:
|
|
||||||
required: true
|
|
||||||
NEXT_PUBLIC_WEBAPP_URL:
|
|
||||||
required: true
|
|
||||||
NEXT_PUBLIC_WEBSITE_URL:
|
|
||||||
required: true
|
|
||||||
NEXTAUTH_SECRET:
|
|
||||||
required: true
|
|
||||||
GOOGLE_API_CREDENTIALS:
|
|
||||||
required: true
|
|
||||||
GOOGLE_LOGIN_ENABLED:
|
|
||||||
required: true
|
|
||||||
CRON_API_KEY:
|
|
||||||
required: false
|
|
||||||
CALENDSO_ENCRYPTION_KEY:
|
|
||||||
required: true
|
|
||||||
DAILY_API_KEY:
|
|
||||||
required: true
|
|
||||||
NEXT_PUBLIC_STRIPE_PUBLIC_KEY:
|
|
||||||
required: true
|
|
||||||
NEXT_PUBLIC_STRIPE_FREE_PLAN_PRICE:
|
|
||||||
required: true
|
|
||||||
NEXT_PUBLIC_STRIPE_PRO_PLAN_PRICE:
|
|
||||||
required: true
|
|
||||||
NEXT_PUBLIC_STRIPE_PREMIUM_PLAN_PRICE:
|
|
||||||
required: true
|
|
||||||
NEXT_PUBLIC_STRIPE_PREMIUM_NEW_PLAN_PRICE:
|
|
||||||
required: true
|
|
||||||
NEXT_PUBLIC_IS_PREMIUM_NEW_PLAN:
|
|
||||||
required: true
|
|
||||||
STRIPE_PRIVATE_KEY:
|
|
||||||
required: true
|
|
||||||
STRIPE_CLIENT_ID:
|
|
||||||
required: true
|
|
||||||
STRIPE_WEBHOOK_SECRET:
|
|
||||||
required: true
|
|
||||||
STRIPE_PRO_PLAN_PRODUCT_ID:
|
|
||||||
required: true
|
|
||||||
STRIPE_PREMIUM_PLAN_PRODUCT_ID:
|
|
||||||
required: true
|
|
||||||
STRIPE_FREE_PLAN_PRODUCT_ID:
|
|
||||||
required: true
|
|
||||||
PAYMENT_FEE_PERCENTAGE:
|
|
||||||
required: true
|
|
||||||
PAYMENT_FEE_FIXED:
|
|
||||||
required: true
|
|
||||||
SAML_DATABASE_URL:
|
|
||||||
required: true
|
|
||||||
SAML_ADMINS:
|
|
||||||
required: true
|
|
||||||
NEXTAUTH_URL:
|
|
||||||
required: true
|
|
||||||
NEXT_PUBLIC_IS_E2E:
|
|
||||||
required: true
|
|
||||||
TURBO_TOKEN:
|
|
||||||
required: true
|
|
||||||
TURBO_TEAM:
|
|
||||||
required: true
|
|
||||||
|
|
||||||
runs:
|
|
||||||
using: "composite"
|
|
||||||
env:
|
|
||||||
DATABASE_URL: ${{ inputs.DATABASE_URL }}
|
|
||||||
NEXT_PUBLIC_WEBAPP_URL: ${{ inputs.NEXT_PUBLIC_WEBAPP_URL }}
|
|
||||||
NEXT_PUBLIC_WEBSITE_URL: ${{ inputs.NEXT_PUBLIC_WEBSITE_URL }}
|
|
||||||
NEXTAUTH_SECRET: ${{ inputs.NEXTAUTH_SECRET }}
|
|
||||||
GOOGLE_API_CREDENTIALS: ${{ inputs.GOOGLE_API_CREDENTIALS }}
|
|
||||||
GOOGLE_LOGIN_ENABLED: ${{ inputs.GOOGLE_LOGIN_ENABLED }}
|
|
||||||
CALENDSO_ENCRYPTION_KEY: ${{ inputs.CALENDSO_ENCRYPTION_KEY }}
|
|
||||||
DAILY_API_KEY: ${{ inputs.DAILY_API_KEY }}
|
|
||||||
NEXT_PUBLIC_STRIPE_PUBLIC_KEY: ${{ inputs.NEXT_PUBLIC_STRIPE_PUBLIC_KEY }}
|
|
||||||
NEXT_PUBLIC_STRIPE_FREE_PLAN_PRICE: ${{ inputs.NEXT_PUBLIC_STRIPE_FREE_PLAN_PRICE }}
|
|
||||||
NEXT_PUBLIC_STRIPE_PRO_PLAN_PRICE: ${{ inputs.NEXT_PUBLIC_STRIPE_PRO_PLAN_PRICE }}
|
|
||||||
NEXT_PUBLIC_STRIPE_PREMIUM_PLAN_PRICE: ${{ inputs.NEXT_PUBLIC_STRIPE_PREMIUM_PLAN_PRICE }}
|
|
||||||
NEXT_PUBLIC_STRIPE_PREMIUM_NEW_PLAN_PRICE: ${{ inputs.NEXT_PUBLIC_STRIPE_PREMIUM_NEW_PLAN_PRICE }}
|
|
||||||
NEXT_PUBLIC_IS_PREMIUM_NEW_PLAN: ${{ inputs.NEXT_PUBLIC_IS_PREMIUM_NEW_PLAN }}
|
|
||||||
STRIPE_PRIVATE_KEY: ${{ inputs.STRIPE_PRIVATE_KEY }}
|
|
||||||
STRIPE_CLIENT_ID: ${{ inputs.STRIPE_CLIENT_ID }}
|
|
||||||
STRIPE_WEBHOOK_SECRET: ${{ inputs.STRIPE_WEBHOOK_SECRET }}
|
|
||||||
STRIPE_PRO_PLAN_PRODUCT_ID: ${{ inputs.STRIPE_PRO_PLAN_PRODUCT_ID }}
|
|
||||||
STRIPE_PREMIUM_PLAN_PRODUCT_ID: ${{ inputs.STRIPE_PREMIUM_PLAN_PRODUCT_ID }}
|
|
||||||
STRIPE_FREE_PLAN_PRODUCT_ID: ${{ inputs.STRIPE_FREE_PLAN_PRODUCT_ID }}
|
|
||||||
PAYMENT_FEE_PERCENTAGE: ${{ inputs.PAYMENT_FEE_PERCENTAGE }}
|
|
||||||
PAYMENT_FEE_FIXED: ${{ inputs.PAYMENT_FEE_FIXED }}
|
|
||||||
SAML_DATABASE_URL: ${{ inputs.SAML_DATABASE_URL }}
|
|
||||||
SAML_ADMINS: ${{ inputs.SAML_ADMINS }}
|
|
||||||
NEXTAUTH_URL: ${{ inputs.NEXTAUTH_URL }}
|
|
||||||
steps:
|
|
||||||
- uses: ./.github/actions/cache-db
|
|
||||||
id: cache-db
|
|
||||||
with:
|
|
||||||
DATABASE_URL: ${{ env.DATABASE_URL }}
|
|
||||||
- uses: ./.github/actions/cache-build
|
|
||||||
id: prod-build-cache
|
|
||||||
- name: Next.js production build
|
|
||||||
if: steps.cache-db.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
|
||||||
run: yarn db-seed
|
|
||||||
- name: Prisma DB seed
|
|
||||||
if: steps.prod-build-cache.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
|
||||||
run: yarn build
|
|
||||||
@@ -1,21 +1,23 @@
|
|||||||
name: Yarn install
|
name: Yarn install
|
||||||
description: "Install all NPM dependencies, caches them and restores if necessary"
|
description: "Install all NPM dependencies, caches them and restores if necessary"
|
||||||
env:
|
inputs:
|
||||||
node_version: v16.x
|
node_version:
|
||||||
|
required: false
|
||||||
|
default: v16.x
|
||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
- name: Use Node ${{ env.node_version }}
|
- name: Use Node ${{ inputs.node_version }}
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: ${{ env.node_version }}
|
node-version: ${{ inputs.node_version }}
|
||||||
cache: "yarn"
|
cache: "yarn"
|
||||||
- name: node_modules cache
|
- name: node_modules cache
|
||||||
id: node-modules-cache
|
id: node-modules-cache
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
env:
|
env:
|
||||||
cache-name: node-modules-yarn
|
cache-name: node-modules-yarn
|
||||||
cache-key: ${{ env.node_version }}-${{ hashFiles('yarn.lock', 'packages/prisma/schema.prisma') }}
|
cache-key: ${{ inputs.node_version }}-${{ hashFiles('yarn.lock', 'packages/prisma/schema.prisma') }}
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
**/node_modules/**
|
**/node_modules/**
|
||||||
|
|||||||
@@ -7,37 +7,6 @@ jobs:
|
|||||||
timeout-minutes: 20
|
timeout-minutes: 20
|
||||||
name: E2E App-Store Apps
|
name: E2E App-Store Apps
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
env:
|
|
||||||
DATABASE_URL: postgresql://postgres:@localhost:5432/calendso
|
|
||||||
NEXT_PUBLIC_WEBAPP_URL: http://localhost:3000
|
|
||||||
NEXT_PUBLIC_WEBSITE_URL: http://localhost:3000
|
|
||||||
NEXTAUTH_SECRET: secret
|
|
||||||
GOOGLE_API_CREDENTIALS: ${{ secrets.CI_GOOGLE_API_CREDENTIALS }}
|
|
||||||
GOOGLE_LOGIN_ENABLED: true
|
|
||||||
# CRON_API_KEY: xxx
|
|
||||||
CALENDSO_ENCRYPTION_KEY: ${{ secrets.CI_CALENDSO_ENCRYPTION_KEY }}
|
|
||||||
NEXT_PUBLIC_STRIPE_PUBLIC_KEY: ${{ secrets.CI_NEXT_PUBLIC_STRIPE_PUBLIC_KEY }}
|
|
||||||
STRIPE_PRIVATE_KEY: ${{ secrets.CI_STRIPE_PRIVATE_KEY }}
|
|
||||||
STRIPE_CLIENT_ID: ${{ secrets.CI_STRIPE_CLIENT_ID }}
|
|
||||||
STRIPE_WEBHOOK_SECRET: ${{ secrets.CI_STRIPE_WEBHOOK_SECRET }}
|
|
||||||
PAYMENT_FEE_PERCENTAGE: 0.005
|
|
||||||
PAYMENT_FEE_FIXED: 10
|
|
||||||
SAML_DATABASE_URL: postgresql://postgres:@localhost:5432/calendso
|
|
||||||
SAML_ADMINS: pro@example.com
|
|
||||||
NEXTAUTH_URL: http://localhost:3000/api/auth
|
|
||||||
NEXT_PUBLIC_IS_E2E: 1
|
|
||||||
# EMAIL_FROM: e2e@cal.com
|
|
||||||
# EMAIL_SERVER_HOST: ${{ secrets.CI_EMAIL_SERVER_HOST }}
|
|
||||||
# EMAIL_SERVER_PORT: ${{ secrets.CI_EMAIL_SERVER_PORT }}
|
|
||||||
# EMAIL_SERVER_USER: ${{ secrets.CI_EMAIL_SERVER_USER }}
|
|
||||||
# EMAIL_SERVER_PASSWORD: ${{ secrets.CI_EMAIL_SERVER_PASSWORD }}
|
|
||||||
# MS_GRAPH_CLIENT_ID: xxx
|
|
||||||
# MS_GRAPH_CLIENT_SECRET: xxx
|
|
||||||
# ZOOM_CLIENT_ID: xxx
|
|
||||||
# ZOOM_CLIENT_SECRET: xxx
|
|
||||||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
|
||||||
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
|
|
||||||
services:
|
services:
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres:12.1
|
image: postgres:12.1
|
||||||
@@ -54,8 +23,7 @@ jobs:
|
|||||||
- uses: ./.github/actions/yarn-install
|
- uses: ./.github/actions/yarn-install
|
||||||
- uses: ./.github/actions/yarn-playwright-install
|
- uses: ./.github/actions/yarn-playwright-install
|
||||||
- uses: ./.github/actions/cache-db
|
- uses: ./.github/actions/cache-db
|
||||||
with:
|
- uses: ./.github/actions/env-read-file
|
||||||
DATABASE_URL: ${{ env.DATABASE_URL }}
|
|
||||||
- uses: ./.github/actions/cache-build
|
- uses: ./.github/actions/cache-build
|
||||||
- name: Run Tests
|
- name: Run Tests
|
||||||
run: yarn test-e2e:app-store
|
run: yarn test-e2e:app-store
|
||||||
|
|||||||
@@ -6,41 +6,6 @@ jobs:
|
|||||||
e2e-embed:
|
e2e-embed:
|
||||||
timeout-minutes: 20
|
timeout-minutes: 20
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
|
||||||
DATABASE_URL: postgresql://postgres:@localhost:5432/calendso
|
|
||||||
NEXT_PUBLIC_WEBAPP_URL: http://localhost:3000
|
|
||||||
NEXT_PUBLIC_WEBSITE_URL: http://localhost:3000
|
|
||||||
NEXTAUTH_SECRET: secret
|
|
||||||
GOOGLE_API_CREDENTIALS: ${{ secrets.CI_GOOGLE_API_CREDENTIALS }}
|
|
||||||
GOOGLE_LOGIN_ENABLED: true
|
|
||||||
# CRON_API_KEY: xxx
|
|
||||||
CALENDSO_ENCRYPTION_KEY: ${{ secrets.CI_CALENDSO_ENCRYPTION_KEY }}
|
|
||||||
NEXT_PUBLIC_STRIPE_PUBLIC_KEY: ${{ secrets.CI_NEXT_PUBLIC_STRIPE_PUBLIC_KEY }}
|
|
||||||
NEXT_PUBLIC_STRIPE_FREE_PLAN_PRICE: ${{ secrets.CI_NEXT_PUBLIC_STRIPE_FREE_PLAN_PRICE }}
|
|
||||||
NEXT_PUBLIC_STRIPE_PRO_PLAN_PRICE: ${{ secrets.CI_NEXT_PUBLIC_STRIPE_PRO_PLAN_PRICE }}
|
|
||||||
NEXT_PUBLIC_STRIPE_PREMIUM_PLAN_PRICE: ${{ secrets.CI_NEXT_PUBLIC_STRIPE_PREMIUM_PLAN_PRICE }}
|
|
||||||
NEXT_PUBLIC_STRIPE_PREMIUM_NEW_PLAN_PRICE: ${{ secrets.NEXT_PUBLIC_STRIPE_PREMIUM_NEW_PLAN_PRICE }}
|
|
||||||
NEXT_PUBLIC_IS_PREMIUM_NEW_PLAN: 1
|
|
||||||
STRIPE_PRIVATE_KEY: ${{ secrets.CI_STRIPE_PRIVATE_KEY }}
|
|
||||||
STRIPE_CLIENT_ID: ${{ secrets.CI_STRIPE_CLIENT_ID }}
|
|
||||||
STRIPE_WEBHOOK_SECRET: ${{ secrets.CI_STRIPE_WEBHOOK_SECRET }}
|
|
||||||
PAYMENT_FEE_PERCENTAGE: 0.005
|
|
||||||
PAYMENT_FEE_FIXED: 10
|
|
||||||
SAML_DATABASE_URL: postgresql://postgres:@localhost:5432/calendso
|
|
||||||
SAML_ADMINS: pro@example.com
|
|
||||||
NEXTAUTH_URL: http://localhost:3000/api/auth
|
|
||||||
NEXT_PUBLIC_IS_E2E: 1
|
|
||||||
# EMAIL_FROM: e2e@cal.com
|
|
||||||
# EMAIL_SERVER_HOST: ${{ secrets.CI_EMAIL_SERVER_HOST }}
|
|
||||||
# EMAIL_SERVER_PORT: ${{ secrets.CI_EMAIL_SERVER_PORT }}
|
|
||||||
# EMAIL_SERVER_USER: ${{ secrets.CI_EMAIL_SERVER_USER }}
|
|
||||||
# EMAIL_SERVER_PASSWORD: ${{ secrets.CI_EMAIL_SERVER_PASSWORD }}
|
|
||||||
# MS_GRAPH_CLIENT_ID: xxx
|
|
||||||
# MS_GRAPH_CLIENT_SECRET: xxx
|
|
||||||
# ZOOM_CLIENT_ID: xxx
|
|
||||||
# ZOOM_CLIENT_SECRET: xxx
|
|
||||||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
|
||||||
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
|
|
||||||
services:
|
services:
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres:12.1
|
image: postgres:12.1
|
||||||
@@ -57,8 +22,7 @@ jobs:
|
|||||||
- uses: ./.github/actions/yarn-install
|
- uses: ./.github/actions/yarn-install
|
||||||
- uses: ./.github/actions/yarn-playwright-install
|
- uses: ./.github/actions/yarn-playwright-install
|
||||||
- uses: ./.github/actions/cache-db
|
- uses: ./.github/actions/cache-db
|
||||||
with:
|
- uses: ./.github/actions/env-read-file
|
||||||
DATABASE_URL: ${{ env.DATABASE_URL }}
|
|
||||||
- uses: ./.github/actions/cache-build
|
- uses: ./.github/actions/cache-build
|
||||||
- name: Run Tests
|
- name: Run Tests
|
||||||
run: yarn turbo run embed-tests-update-snapshots:ci --scope=@calcom/embed-react --concurrency=1
|
run: yarn turbo run embed-tests-update-snapshots:ci --scope=@calcom/embed-react --concurrency=1
|
||||||
|
|||||||
@@ -4,46 +4,8 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
e2e:
|
e2e:
|
||||||
timeout-minutes: 20
|
timeout-minutes: 20
|
||||||
runs-on: buildjet-4vcpu-ubuntu-2204
|
name: E2E tests
|
||||||
env:
|
runs-on: ubuntu-latest
|
||||||
DATABASE_URL: postgresql://postgres:@localhost:5432/calendso
|
|
||||||
NEXT_PUBLIC_WEBAPP_URL: http://localhost:3000
|
|
||||||
NEXT_PUBLIC_WEBSITE_URL: http://localhost:3000
|
|
||||||
NEXTAUTH_SECRET: secret
|
|
||||||
GOOGLE_API_CREDENTIALS: ${{ secrets.CI_GOOGLE_API_CREDENTIALS }}
|
|
||||||
GOOGLE_LOGIN_ENABLED: true
|
|
||||||
# CRON_API_KEY: xxx
|
|
||||||
CALENDSO_ENCRYPTION_KEY: ${{ secrets.CI_CALENDSO_ENCRYPTION_KEY }}
|
|
||||||
DAILY_API_KEY: ${{ secrets.CI_DAILY_API_KEY }}
|
|
||||||
NEXT_PUBLIC_STRIPE_PUBLIC_KEY: ${{ secrets.CI_NEXT_PUBLIC_STRIPE_PUBLIC_KEY }}
|
|
||||||
NEXT_PUBLIC_STRIPE_FREE_PLAN_PRICE: ${{ secrets.CI_NEXT_PUBLIC_STRIPE_FREE_PLAN_PRICE }}
|
|
||||||
NEXT_PUBLIC_STRIPE_PRO_PLAN_PRICE: ${{ secrets.CI_NEXT_PUBLIC_STRIPE_PRO_PLAN_PRICE }}
|
|
||||||
NEXT_PUBLIC_STRIPE_PREMIUM_PLAN_PRICE: ${{ secrets.CI_NEXT_PUBLIC_STRIPE_PREMIUM_PLAN_PRICE }}
|
|
||||||
NEXT_PUBLIC_STRIPE_PREMIUM_NEW_PLAN_PRICE: ${{ secrets.NEXT_PUBLIC_STRIPE_PREMIUM_NEW_PLAN_PRICE }}
|
|
||||||
NEXT_PUBLIC_IS_PREMIUM_NEW_PLAN: 1
|
|
||||||
STRIPE_PRIVATE_KEY: ${{ secrets.CI_STRIPE_PRIVATE_KEY }}
|
|
||||||
STRIPE_CLIENT_ID: ${{ secrets.CI_STRIPE_CLIENT_ID }}
|
|
||||||
STRIPE_WEBHOOK_SECRET: ${{ secrets.CI_STRIPE_WEBHOOK_SECRET }}
|
|
||||||
STRIPE_PRO_PLAN_PRODUCT_ID: ${{ secrets.CI_STRIPE_PRO_PLAN_PRODUCT_ID }}
|
|
||||||
STRIPE_PREMIUM_PLAN_PRODUCT_ID: ${{ secrets.CI_STRIPE_PREMIUM_PLAN_PRODUCT_ID }}
|
|
||||||
STRIPE_FREE_PLAN_PRODUCT_ID: ${{ secrets.CI_STRIPE_FREE_PLAN_PRODUCT_ID }}
|
|
||||||
PAYMENT_FEE_PERCENTAGE: 0.005
|
|
||||||
PAYMENT_FEE_FIXED: 10
|
|
||||||
SAML_DATABASE_URL: postgresql://postgres:@localhost:5432/calendso
|
|
||||||
SAML_ADMINS: pro@example.com
|
|
||||||
NEXTAUTH_URL: http://localhost:3000/api/auth
|
|
||||||
NEXT_PUBLIC_IS_E2E: 1
|
|
||||||
# EMAIL_FROM: e2e@cal.com
|
|
||||||
# EMAIL_SERVER_HOST: ${{ secrets.CI_EMAIL_SERVER_HOST }}
|
|
||||||
# EMAIL_SERVER_PORT: ${{ secrets.CI_EMAIL_SERVER_PORT }}
|
|
||||||
# EMAIL_SERVER_USER: ${{ secrets.CI_EMAIL_SERVER_USER }}
|
|
||||||
# EMAIL_SERVER_PASSWORD: ${{ secrets.CI_EMAIL_SERVER_PASSWORD }}
|
|
||||||
# MS_GRAPH_CLIENT_ID: xxx
|
|
||||||
# MS_GRAPH_CLIENT_SECRET: xxx
|
|
||||||
# ZOOM_CLIENT_ID: xxx
|
|
||||||
# ZOOM_CLIENT_SECRET: xxx
|
|
||||||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
|
||||||
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
|
|
||||||
services:
|
services:
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres:12.1
|
image: postgres:12.1
|
||||||
@@ -52,7 +14,6 @@ jobs:
|
|||||||
POSTGRES_DB: calendso
|
POSTGRES_DB: calendso
|
||||||
ports:
|
ports:
|
||||||
- 5432:5432
|
- 5432:5432
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: ./.github/actions/dangerous-git-checkout
|
- uses: ./.github/actions/dangerous-git-checkout
|
||||||
@@ -60,11 +21,11 @@ jobs:
|
|||||||
- uses: ./.github/actions/yarn-install
|
- uses: ./.github/actions/yarn-install
|
||||||
- uses: ./.github/actions/yarn-playwright-install
|
- uses: ./.github/actions/yarn-playwright-install
|
||||||
- uses: ./.github/actions/cache-db
|
- uses: ./.github/actions/cache-db
|
||||||
with:
|
- uses: ./.github/actions/env-read-file
|
||||||
DATABASE_URL: ${{ env.DATABASE_URL }}
|
|
||||||
- uses: ./.github/actions/cache-build
|
- uses: ./.github/actions/cache-build
|
||||||
- run: yarn test-e2e
|
- name: Run Tests
|
||||||
- name: Upload test results
|
run: yarn test-e2e
|
||||||
|
- name: Upload Test Results
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -0,0 +1,49 @@
|
|||||||
|
name: Create .env file
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
|
||||||
|
env:
|
||||||
|
INPUT_ENV_DATABASE_URL: postgresql://postgres:@localhost:5432/calendso
|
||||||
|
INPUT_ENV_NEXT_PUBLIC_WEBAPP_URL: http://localhost:3000
|
||||||
|
INPUT_ENV_NEXT_PUBLIC_WEBSITE_URL: http://localhost:3000
|
||||||
|
INPUT_ENV_NEXTAUTH_SECRET: secret
|
||||||
|
INPUT_ENV_GOOGLE_API_CREDENTIALS: ${{ secrets.CI_GOOGLE_API_CREDENTIALS }}
|
||||||
|
INPUT_ENV_GOOGLE_LOGIN_ENABLED: true
|
||||||
|
# INPUT_ENV_CRON_API_KEY: xxx
|
||||||
|
INPUT_ENV_CALENDSO_ENCRYPTION_KEY: ${{ secrets.CI_CALENDSO_ENCRYPTION_KEY }}
|
||||||
|
INPUT_ENV_NEXT_PUBLIC_STRIPE_PUBLIC_KEY: ${{ secrets.CI_NEXT_PUBLIC_STRIPE_PUBLIC_KEY }}
|
||||||
|
INPUT_ENV_STRIPE_PRIVATE_KEY: ${{ secrets.CI_STRIPE_PRIVATE_KEY }}
|
||||||
|
INPUT_ENV_STRIPE_CLIENT_ID: ${{ secrets.CI_STRIPE_CLIENT_ID }}
|
||||||
|
INPUT_ENV_STRIPE_WEBHOOK_SECRET: ${{ secrets.CI_STRIPE_WEBHOOK_SECRET }}
|
||||||
|
INPUT_ENV_PAYMENT_FEE_PERCENTAGE: 0.005
|
||||||
|
INPUT_ENV_PAYMENT_FEE_FIXED: 10
|
||||||
|
INPUT_ENV_SAML_DATABASE_URL: postgresql://postgres:@localhost:5432/calendso
|
||||||
|
INPUT_ENV_SAML_ADMINS: pro@example.com
|
||||||
|
INPUT_ENV_NEXTAUTH_URL: http://localhost:3000/api/auth
|
||||||
|
INPUT_ENV_NEXT_PUBLIC_IS_E2E: 1
|
||||||
|
# INPUT_ENV_EMAIL_FROM: e2e@cal.com
|
||||||
|
# INPUT_ENV_EMAIL_SERVER_HOST: ${{ secrets.CI_EMAIL_SERVER_HOST }}
|
||||||
|
# INPUT_ENV_EMAIL_SERVER_PORT: ${{ secrets.CI_EMAIL_SERVER_PORT }}
|
||||||
|
# INPUT_ENV_EMAIL_SERVER_USER: ${{ secrets.CI_EMAIL_SERVER_USER }}
|
||||||
|
# INPUT_ENV_EMAIL_SERVER_PASSWORD: ${{ secrets.CI_EMAIL_SERVER_PASSWORD }}
|
||||||
|
# INPUT_ENV_MS_GRAPH_CLIENT_ID: xxx
|
||||||
|
# INPUT_ENV_MS_GRAPH_CLIENT_SECRET: xxx
|
||||||
|
# INPUT_ENV_ZOOM_CLIENT_ID: xxx
|
||||||
|
# INPUT_ENV_ZOOM_CLIENT_SECRET: xxx
|
||||||
|
INPUT_ENV_TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
||||||
|
INPUT_ENV_TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
create_env_file:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: ozaytsev86/create-env-file@v1
|
||||||
|
with:
|
||||||
|
file-name: ${{ github.workspace }}/gh.env
|
||||||
|
- uses: actions/cache@v3
|
||||||
|
id: env-cache
|
||||||
|
with:
|
||||||
|
path: gh.env
|
||||||
|
key: env-cache-${{ hashFiles('gh.env') }}
|
||||||
@@ -32,6 +32,11 @@ jobs:
|
|||||||
- 'apps/web/**'
|
- 'apps/web/**'
|
||||||
- 'packages/embeds/**'
|
- 'packages/embeds/**'
|
||||||
|
|
||||||
|
env:
|
||||||
|
name: Create env file
|
||||||
|
uses: ./.github/workflows/env-create-file.yml
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
setup:
|
setup:
|
||||||
name: Yarn install & cache
|
name: Yarn install & cache
|
||||||
uses: ./.github/workflows/yarn-install.yml
|
uses: ./.github/workflows/yarn-install.yml
|
||||||
@@ -57,13 +62,13 @@ jobs:
|
|||||||
|
|
||||||
build:
|
build:
|
||||||
name: Production build
|
name: Production build
|
||||||
needs: setup
|
needs: [setup, env]
|
||||||
uses: ./.github/workflows/production-build.yml
|
uses: ./.github/workflows/production-build.yml
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
e2e:
|
e2e:
|
||||||
name: E2E tests
|
name: E2E tests
|
||||||
needs: [lint, build]
|
needs: [changes, lint, build]
|
||||||
uses: ./.github/workflows/e2e.yml
|
uses: ./.github/workflows/e2e.yml
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
|
|||||||
@@ -3,36 +3,6 @@ name: Production Build
|
|||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
|
|
||||||
env:
|
|
||||||
DATABASE_URL: postgresql://postgres:@localhost:5432/calendso
|
|
||||||
NEXT_PUBLIC_WEBAPP_URL: http://localhost:3000
|
|
||||||
NEXT_PUBLIC_WEBSITE_URL: http://localhost:3000
|
|
||||||
NEXTAUTH_SECRET: secret
|
|
||||||
GOOGLE_API_CREDENTIALS: ${{ secrets.CI_GOOGLE_API_CREDENTIALS }}
|
|
||||||
GOOGLE_LOGIN_ENABLED: true
|
|
||||||
# CRON_API_KEY: xxx
|
|
||||||
CALENDSO_ENCRYPTION_KEY: ${{ secrets.CI_CALENDSO_ENCRYPTION_KEY }}
|
|
||||||
DAILY_API_KEY: ${{ secrets.CI_DAILY_API_KEY }}
|
|
||||||
NEXT_PUBLIC_STRIPE_PUBLIC_KEY: ${{ secrets.CI_NEXT_PUBLIC_STRIPE_PUBLIC_KEY }}
|
|
||||||
NEXT_PUBLIC_STRIPE_FREE_PLAN_PRICE: ${{ secrets.CI_NEXT_PUBLIC_STRIPE_FREE_PLAN_PRICE }}
|
|
||||||
NEXT_PUBLIC_STRIPE_PRO_PLAN_PRICE: ${{ secrets.CI_NEXT_PUBLIC_STRIPE_PRO_PLAN_PRICE }}
|
|
||||||
NEXT_PUBLIC_STRIPE_PREMIUM_PLAN_PRICE: ${{ secrets.CI_NEXT_PUBLIC_STRIPE_PREMIUM_PLAN_PRICE }}
|
|
||||||
NEXT_PUBLIC_STRIPE_PREMIUM_NEW_PLAN_PRICE: ${{ secrets.NEXT_PUBLIC_STRIPE_PREMIUM_NEW_PLAN_PRICE }}
|
|
||||||
NEXT_PUBLIC_IS_PREMIUM_NEW_PLAN: 1
|
|
||||||
STRIPE_PRIVATE_KEY: ${{ secrets.CI_STRIPE_PRIVATE_KEY }}
|
|
||||||
STRIPE_CLIENT_ID: ${{ secrets.CI_STRIPE_CLIENT_ID }}
|
|
||||||
STRIPE_WEBHOOK_SECRET: ${{ secrets.CI_STRIPE_WEBHOOK_SECRET }}
|
|
||||||
STRIPE_PRO_PLAN_PRODUCT_ID: ${{ secrets.CI_STRIPE_PRO_PLAN_PRODUCT_ID }}
|
|
||||||
STRIPE_PREMIUM_PLAN_PRODUCT_ID: ${{ secrets.CI_STRIPE_PREMIUM_PLAN_PRODUCT_ID }}
|
|
||||||
STRIPE_FREE_PLAN_PRODUCT_ID: ${{ secrets.CI_STRIPE_FREE_PLAN_PRODUCT_ID }}
|
|
||||||
PAYMENT_FEE_PERCENTAGE: 0.005
|
|
||||||
PAYMENT_FEE_FIXED: 10
|
|
||||||
SAML_DATABASE_URL: postgresql://postgres:@localhost:5432/calendso
|
|
||||||
SAML_ADMINS: pro@example.com
|
|
||||||
NEXTAUTH_URL: http://localhost:3000/api/auth
|
|
||||||
NEXT_PUBLIC_IS_E2E: 1
|
|
||||||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
|
||||||
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Build
|
name: Build
|
||||||
@@ -49,34 +19,6 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: ./.github/actions/yarn-install
|
- uses: ./.github/actions/yarn-install
|
||||||
- uses: ./.github/actions/yarn-build
|
- uses: ./.github/actions/env-read-file
|
||||||
with:
|
- uses: ./.github/actions/cache-db
|
||||||
# GitHub Composite actions cannot read secrets, we have to pass them in here
|
- uses: ./.github/actions/cache-build
|
||||||
DATABASE_URL: ${{ env.DATABASE_URL }}
|
|
||||||
NEXT_PUBLIC_WEBAPP_URL: ${{ env.NEXT_PUBLIC_WEBAPP_URL }}
|
|
||||||
NEXT_PUBLIC_WEBSITE_URL: ${{ env.NEXT_PUBLIC_WEBSITE_URL }}
|
|
||||||
NEXTAUTH_SECRET: ${{ env.NEXTAUTH_SECRET }}
|
|
||||||
GOOGLE_API_CREDENTIALS: ${{ env.GOOGLE_API_CREDENTIALS }}
|
|
||||||
GOOGLE_LOGIN_ENABLED: ${{ env.GOOGLE_LOGIN_ENABLED }}
|
|
||||||
CALENDSO_ENCRYPTION_KEY: ${{ env.CALENDSO_ENCRYPTION_KEY }}
|
|
||||||
DAILY_API_KEY: ${{ env.DAILY_API_KEY }}
|
|
||||||
NEXT_PUBLIC_STRIPE_PUBLIC_KEY: ${{ env.NEXT_PUBLIC_STRIPE_PUBLIC_KEY }}
|
|
||||||
NEXT_PUBLIC_STRIPE_FREE_PLAN_PRICE: ${{ env.NEXT_PUBLIC_STRIPE_FREE_PLAN_PRICE }}
|
|
||||||
NEXT_PUBLIC_STRIPE_PRO_PLAN_PRICE: ${{ env.NEXT_PUBLIC_STRIPE_PRO_PLAN_PRICE }}
|
|
||||||
NEXT_PUBLIC_STRIPE_PREMIUM_PLAN_PRICE: ${{ env.NEXT_PUBLIC_STRIPE_PREMIUM_PLAN_PRICE }}
|
|
||||||
NEXT_PUBLIC_STRIPE_PREMIUM_NEW_PLAN_PRICE: ${{ env.NEXT_PUBLIC_STRIPE_PREMIUM_NEW_PLAN_PRICE }}
|
|
||||||
NEXT_PUBLIC_IS_PREMIUM_NEW_PLAN: ${{ env.NEXT_PUBLIC_IS_PREMIUM_NEW_PLAN }}
|
|
||||||
STRIPE_PRIVATE_KEY: ${{ env.STRIPE_PRIVATE_KEY }}
|
|
||||||
STRIPE_CLIENT_ID: ${{ env.STRIPE_CLIENT_ID }}
|
|
||||||
STRIPE_WEBHOOK_SECRET: ${{ env.STRIPE_WEBHOOK_SECRET }}
|
|
||||||
STRIPE_PRO_PLAN_PRODUCT_ID: ${{ env.STRIPE_PRO_PLAN_PRODUCT_ID }}
|
|
||||||
STRIPE_PREMIUM_PLAN_PRODUCT_ID: ${{ env.STRIPE_PREMIUM_PLAN_PRODUCT_ID }}
|
|
||||||
STRIPE_FREE_PLAN_PRODUCT_ID: ${{ env.STRIPE_FREE_PLAN_PRODUCT_ID }}
|
|
||||||
PAYMENT_FEE_PERCENTAGE: ${{ env.PAYMENT_FEE_PERCENTAGE }}
|
|
||||||
PAYMENT_FEE_FIXED: ${{ env.PAYMENT_FEE_FIXED }}
|
|
||||||
SAML_DATABASE_URL: ${{ env.SAML_DATABASE_URL }}
|
|
||||||
SAML_ADMINS: ${{ env.SAML_ADMINS }}
|
|
||||||
NEXTAUTH_URL: ${{ env.NEXTAUTH_URL }}
|
|
||||||
NEXT_PUBLIC_IS_E2E: ${{ env.NEXT_PUBLIC_IS_E2E }}
|
|
||||||
TURBO_TOKEN: ${{ env.TURBO_TOKEN }}
|
|
||||||
TURBO_TEAM: ${{ env.TURBO_TEAM }}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user