forked from calcom/cal.com
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Solves Github actions caching issues (calcom#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 (calcom#7318) * WIP * Sends correct emails for paid bookings * Update PaymentService.ts * Update webhook.ts * Update webhook.ts * Update settings back button redirect link (calcom#7403) * fix(schedule): close on click calcom#7143 * fix(EventSetupTab): validLocations length will always match validLocations length calcom#7138 * fix(SettingsLayout): go back to right route calcom#7379 * feat: get country code from ip geolocation (calcom#6880) * feat: get coutnry code from ip geolocation Signed-off-by: Udit Takkar <[email protected]> * fix: create new api route for fetching code Signed-off-by: Udit Takkar <[email protected]> * chore: replace city with country Signed-off-by: Udit Takkar <[email protected]> * refactor: create hook for country Signed-off-by: Udit Takkar <[email protected]> --------- Signed-off-by: Udit Takkar <[email protected]> * Team Workflows (calcom#7038) Co-authored-by: Hariom Balhara <[email protected]> Co-authored-by: CarinaWolli <[email protected]> Co-authored-by: zomars <[email protected]> Co-authored-by: Peer Richelsen <[email protected]> * Add destination calendar name to DestinationCalendarSelector (calcom#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 <[email protected]> * Update viewer.tsx (calcom#7428) * Fix - add team members to emails (calcom#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 <[email protected]> * Remove booking select object * Revert "Remove booking select object" This reverts commit 9f121ff. * Refactor email manager (calcom#7270) Co-authored-by: zomars <[email protected]> * Type change * Remove conditional check for updateAllCalendarEvents --------- Co-authored-by: zomars <[email protected]> * Typefix * Updates webhook response * Update pr.yml --------- Signed-off-by: Udit Takkar <[email protected]> Co-authored-by: Esaú Morais <[email protected]> Co-authored-by: Udit Takkar <[email protected]> Co-authored-by: Carina Wollendorfer <[email protected]> Co-authored-by: Hariom Balhara <[email protected]> Co-authored-by: CarinaWolli <[email protected]> Co-authored-by: Peer Richelsen <[email protected]> Co-authored-by: Joe Au-Yeung <[email protected]>
- Loading branch information
1 parent
4eecd42
commit d19eaae
Showing
12 changed files
with
120 additions
and
301 deletions.
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 |
---|---|---|
@@ -1,22 +1,26 @@ | ||
name: Cache production build binaries | ||
description: "Cache or restore if necessary" | ||
env: | ||
node_version: v16.x | ||
inputs: | ||
node_version: | ||
required: false | ||
default: v16.x | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Cache production build | ||
uses: actions/cache@v3 | ||
id: cache-build | ||
env: | ||
cache-name: prod-build | ||
key-1: ${{ env.node_version }}-${{ hashFiles('yarn.lock') }} | ||
key-2: ${{ hashFiles('apps/web/next.config.js') }} | ||
key-3: ${{ hashFiles('**.[jt]s', '**.[jt]sx') }} | ||
key-1: ${{ inputs.node_version }}-${{ hashFiles('yarn.lock') }} | ||
key-2: ${{ hashFiles('**.[jt]s', '**.[jt]sx') }} | ||
key-3: ${{ github.event.pull_request.number || github.ref }} | ||
with: | ||
path: | | ||
${{ github.workspace }}/apps/web/.next/cache | ||
${{ github.workspace }}/apps/web/.next | ||
**/.turbo/** | ||
**/dist/** | ||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ env.key-1 }}-${{ env.key-2 }}-${{ env.key-3 }}-${{ github.sha }} | ||
restore-keys: | | ||
${{ runner.os }}-${{ env.cache-name }}-${{ env.key-1 }}-${{ env.key-2 }}-${{ env.key-3 }}- | ||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ env.key-1 }}-${{ env.key-2 }}-${{ env.key-3 }} | ||
- run: yarn build | ||
if: steps.cache-build.outputs.cache-hit != 'true' | ||
shell: bash |
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,8 @@ name: Cache database between jobs | |
description: "Cache or restore if necessary" | ||
inputs: | ||
DATABASE_URL: | ||
required: true | ||
required: false | ||
default: "postgresql://postgres:@localhost:5432/calendso" | ||
path: | ||
required: false | ||
default: "backups/backup.sql" | ||
|
@@ -14,11 +15,15 @@ runs: | |
uses: actions/cache@v3 | ||
env: | ||
cache-name: cache-db | ||
key-1: ${{ hashFiles('packages/prisma/schema.prisma','packages/prisma/migrations/**.sql','packages/prisma/*.ts') }} | ||
with: | ||
path: ${{ inputs.path }} | ||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ inputs.path }}-${{ github.sha }} | ||
restore-keys: | | ||
${{ runner.os }}-${{ env.cache-name }}-${{ inputs.path }}-${{ github.sha }} | ||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ inputs.path }}-${{ env.key-1 }}-${{ github.sha }} | ||
restore-keys: | | ||
${{ 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 | ||
if: steps.cache-db.outputs.cache-hit != 'true' | ||
uses: tj-actions/[email protected] | ||
|
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,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 |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -7,37 +7,6 @@ jobs: | |
timeout-minutes: 20 | ||
name: E2E App-Store Apps | ||
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: [email protected] | ||
NEXTAUTH_URL: http://localhost:3000/api/auth | ||
NEXT_PUBLIC_IS_E2E: 1 | ||
# EMAIL_FROM: [email protected] | ||
# 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: | ||
postgres: | ||
image: postgres:12.1 | ||
|
@@ -54,8 +23,7 @@ jobs: | |
- uses: ./.github/actions/yarn-install | ||
- uses: ./.github/actions/yarn-playwright-install | ||
- uses: ./.github/actions/cache-db | ||
with: | ||
DATABASE_URL: ${{ env.DATABASE_URL }} | ||
- uses: ./.github/actions/env-read-file | ||
- uses: ./.github/actions/cache-build | ||
- name: Run Tests | ||
run: yarn test-e2e:app-store | ||
|
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 |
---|---|---|
|
@@ -6,41 +6,6 @@ jobs: | |
e2e-embed: | ||
timeout-minutes: 20 | ||
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: [email protected] | ||
NEXTAUTH_URL: http://localhost:3000/api/auth | ||
NEXT_PUBLIC_IS_E2E: 1 | ||
# EMAIL_FROM: [email protected] | ||
# 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: | ||
postgres: | ||
image: postgres:12.1 | ||
|
@@ -57,8 +22,7 @@ jobs: | |
- uses: ./.github/actions/yarn-install | ||
- uses: ./.github/actions/yarn-playwright-install | ||
- uses: ./.github/actions/cache-db | ||
with: | ||
DATABASE_URL: ${{ env.DATABASE_URL }} | ||
- uses: ./.github/actions/env-read-file | ||
- uses: ./.github/actions/cache-build | ||
- name: Run Tests | ||
run: yarn turbo run embed-tests-update-snapshots:ci --scope=@calcom/embed-react --concurrency=1 | ||
|
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 |
---|---|---|
|
@@ -4,46 +4,8 @@ on: | |
jobs: | ||
e2e: | ||
timeout-minutes: 20 | ||
runs-on: buildjet-4vcpu-ubuntu-2204 | ||
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: [email protected] | ||
NEXTAUTH_URL: http://localhost:3000/api/auth | ||
NEXT_PUBLIC_IS_E2E: 1 | ||
# EMAIL_FROM: [email protected] | ||
# 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 }} | ||
name: E2E tests | ||
runs-on: ubuntu-latest | ||
services: | ||
postgres: | ||
image: postgres:12.1 | ||
|
@@ -52,19 +14,18 @@ jobs: | |
POSTGRES_DB: calendso | ||
ports: | ||
- 5432:5432 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ./.github/actions/dangerous-git-checkout | ||
- run: echo 'NODE_OPTIONS="--max_old_space_size=4096"' >> $GITHUB_ENV | ||
- uses: ./.github/actions/yarn-install | ||
- uses: ./.github/actions/yarn-playwright-install | ||
- uses: ./.github/actions/cache-db | ||
with: | ||
DATABASE_URL: ${{ env.DATABASE_URL }} | ||
- uses: ./.github/actions/env-read-file | ||
- uses: ./.github/actions/cache-build | ||
- run: yarn test-e2e | ||
- name: Upload test results | ||
- name: Run Tests | ||
run: yarn test-e2e | ||
- name: Upload Test Results | ||
if: ${{ always() }} | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
|
Oops, something went wrong.