- Add i18n.lock to path filter exclusions alongside common.json
- Optimizes CI performance for auto-generated translation PRs from lingo.dev
- Maintains full checks for all other code changes
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* fix: prevent non-E2E labels from triggering workflow runs
- Add conditional logic to all jobs to skip when non-ready-for-e2e labels are added
- Only allow ready-for-e2e label additions to trigger workflows
- Preserve all other trigger types (opened, synchronize, reopened)
- Fixes issue where labels like 'Improvements' cause unnecessary CI runs
Resolves the annoyance where adding labels like 'Improvements' to PRs
triggers full workflow runs including all checks, when only the
ready-for-e2e label should trigger E2E tests and associated builds.
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
* refactor: consolidate workflow conditional logic into environment variable
- Replace repeated conditional logic with single SKIP_WORKFLOW env variable
- Simplify all job conditions from complex expression to env.SKIP_WORKFLOW != 'true'
- Maintain exact same functional behavior while improving maintainability
- Reduces code duplication across 20+ jobs in the workflow
This addresses feedback to consolidate the repeated conditional logic:
github.event.action != 'labeled' || github.event.label.name == 'ready-for-e2e'
The refactored approach is cleaner and easier to maintain.
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
* fix: update required job logic to handle skipped jobs correctly
- Remove 'skipped' from failure conditions in required job
- Add SKIP_WORKFLOW condition to required job logic
- Prevents false failures when E2E jobs legitimately skip
- Maintains proper failure detection for actual job failures
This fixes the CI failure where the required job was treating
legitimately skipped E2E jobs as failures when no ready-for-e2e
label is present.
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* refactor: replace i18n HTTP requests with build-time bundling
- Create translationBundler.ts for build-time translation loading
- Replace HTTP fetch in loadTranslations with file system reads
- Add CalComVersion cache invalidation to prevent stale translations
- Fix TypeScript errors in booking page components
- Eliminate 60s timeout issues by removing network dependency
Resolves translation timeout issues by bundling translations at build time
instead of making runtime HTTP requests to /static/locales/ endpoints.
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
* fix: move i18n files back to packages/lib/server with proper imports
- Move i18n.ts and translationBundler.ts back to packages/lib/server/
- Replace all relative imports with @calcom/lib/server/i18n pattern
- Fix LOCALES_PATH to point to correct directory
- Maintain optimized serverless-friendly translation loading
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
* refactor: move locale files to packages/lib/server to eliminate circular deps
- Move all locale files from apps/web/public/static/locales to packages/lib/server/locales
- Create copy-locales-static.js script to copy files during build
- Update all references to use new location for build-time access
- Maintain public folder copying for Next.js runtime access
- Update platform atoms, scripts, and config files
- Fix copy script relative path issue
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
* fix: update test imports after locale refactor
- Fix import paths in test files updated by pre-commit hooks
- Ensure all tests use correct locale import paths
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
* fix: revert import paths from @calcom/web/lib/i18n to @calcom/lib/server/i18n
- Revert all test file imports back to @calcom/lib/server/i18n as requested
- Addresses GitHub comment feedback to stick with packages/lib/server location
- Fixes import paths in 6 test files that were incorrectly changed
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
* fix: update vite config alias to use new locale path
- Update @calcom/web/public/static/locales/en/common.json to @calcom/lib/server/locales/en/common.json
- Addresses GitHub comment about updating platform atoms vite config
- Maintains correct path resolution after locale files moved to packages/lib/server
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
* fix: update translationBundler path resolution for production builds
- Use process.cwd() instead of __dirname for locale file path resolution
- Ensures locale files can be found in both development and production environments
- Fixes E2E test failures caused by missing locale files in .next/server/chunks/
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
* fix: use relative path resolution for locale files in translationBundler
- Change from process.cwd() to __dirname with relative paths
- Ensures locale files can be found in both development and production environments
- Fixes E2E test failures caused by incorrect path resolution in Next.js builds
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
* fix: use process.cwd() for locale path resolution in production builds
- Change from __dirname to process.cwd() with relative paths
- Ensures locale files can be found when bundled into Next.js server chunks
- Fixes E2E test failures caused by incorrect path resolution in production environment
- Follows same pattern used in getStaticProps.tsx for cross-package file access
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
* fix: use path.resolve pattern from sendVerificationRequest for locale access
- Change from process.cwd() to path.resolve(process.cwd(), '..', '..', 'packages/lib/server/locales')
- Follows same pattern used in sendVerificationRequest.ts for cross-environment file access
- Should resolve E2E test failures by ensuring locale files can be found when bundled into Next.js server chunks
- Pattern navigates up from current working directory to reach packages directory consistently
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
* fix: use dynamic monorepo root detection for locale path resolution
- Replace relative path resolution with dynamic monorepo root finder
- Ensures locale files can be found from any working directory (root, apps/web, apps/api/v2)
- Update API v2 i18n config to use new locale path
- Fixes remaining E2E test failures in API v2 and E2E (1/4) test suites
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
* fix: use require.resolve(__filename) for robust path resolution in all contexts
- Replace __dirname with require.resolve(__filename) in monorepo root detection
- Ensures locale files can be found when running from any working directory
- Fixes E2E API v2 test failures where __dirname resolves to '.' instead of actual file path
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
* Revert "fix: use require.resolve(__filename) for robust path resolution in all contexts"
This reverts commit b37d8226000da8f7d5fb98b83dd0e95a53d45372.
* fix: update copied locale files after translationBundler path resolution fix
- Copy script updated all locale files in public directory
- Ensures E2E tests have access to latest locale files
- Fixes regression where all E2E tests were failing
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
* feat: remove existing locale files to establish copy script as single source of truth
- Delete all common.json files from apps/web/public/static/locales/
- Eliminates developer confusion about which files are authoritative
- copy-locales-static.js script now clearly the only mechanism for populating public folder
- packages/lib/server/locales/ remains the definitive source of truth for translations
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
* add comment
* refactor: simplify findMonorepoRoot by removing redundant fallback loop
- Remove unnecessary second while loop using process.cwd()
- The first loop from __dirname will always find the monorepo root
- Add clear error message for fail-fast behavior if repo structure is corrupted
- Improves code clarity and maintainability
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
* feat: integrate updated translations from main branch
- Restore all common.json files from main branch to apps/web/public/static/locales/
- Overwrite packages/lib/server/locales/ with up-to-date translation content
- Resolve merge conflicts using Benny's safer 2-step approach
- Ensure translation source of truth remains in packages/lib/server/locales/
- Complete safer conflict resolution to eliminate merge conflicts on PR #22422
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
* chore: update package.json and yarn.lock after translation integration
- Update dependencies after ts-node installation for pre-commit hooks
- Ensure yarn.lock reflects current dependency state
- Complete translation integration process
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
* feat: remove duplicate locale files from apps/web to establish single source of truth
- Delete all common.json files from apps/web/public/static/locales/
- Maintain packages/lib/server/locales/ as the single source of truth for translations
- copy-locales-static.js script will populate public folder during build process
- Complete Benny's safer 2-step approach: restore from main, then remove duplicates
- Resolve merge conflicts and eliminate developer confusion about translation file locations
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: hbjORbj <sldisek783@gmail.com>
2025-07-12 07:49:27 +00:00
Keith WilliamsGitHubDevin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
- Simplify conditional logic in check-label job output
- Remove redundant condition that caused race condition
- Maintain event filtering to only run when ready-for-e2e label is added
- Fixes issue where workflow failed despite script finding the label correctly
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2025-07-03 00:21:43 +00:00
Anik Dhabal BabuGitHubanik@cal.com <anik@cal.com>Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* chore: Add Docs build to CI
* Added build-docs to flow
* Updated to run in the /docs folder
* Made web app build have consistent name
* Added a kill after the command runs
* Test the build
* Added it to the PR flow
* chore: Add replexica for AI i18n
* Add write permission
* moved i18n to repo root
* Added checkout to i18n job
* Added contents:read
* Added actions: write for testing
* Updated contents: write
* feat: add missing translations
* Checking out the i18n files from PR head sha
* Added the rest of the languages
* Added i18n to list of required checks
* Added a comment explaining the custom common.json checkout
* Commented out languages to not crush Replexica usage
* Add a fetch-depth: 2
* Supporting fetch of external fork branch
* Put back the dynamic sha
* Added a check for null so this can run manually and not just on PRs
* Removed comments
* feat: update translations
* Reverted de and fr to re-run with new settings
* feat: update translations
* Reverted de and fr to re-run with new settings
* feat: update translations
* Removed crowdin
* Limited languages to major ones for 1st pass
* feat: update translations
* Fixing es test
* Reverted yarn.lock changes
---------
Co-authored-by: Replexica <support@replexica.com>
* chore: Remove unit tests from running after crowd in
* Update permissions on all workflows
* Updated pr permissions
* Added actions:write to top-level pr
* Update .github/workflows/unit-tests.yml
* Removed the linting annotation
* Added a log for pull_request
* Added labels logging
* Using labels straight from event PR object
* Converting to JSON
* Switching to use payload
* Fixed issue with undefined pr
* Fixed non-mapping issue
* Removed the types
* Added another cache key segment using the head commit sha
* Added separate workflow for labeled action
* Fixed syntax error
* Fixing payload issue
* Added log
* logging full object
* Put e2e back in the names to help find them
* Limited logging
* fix: v2 even-types versioning
* test: old v2 even-types request with VERSION_2024_06_11
* test: old v2 even-types request with VERSION_2024_04_15
---------
Co-authored-by: Keith Williams <keithwillcode@gmail.com>
* Added a log for pull_request
* Added labels logging
* Using labels straight from event PR object
* Converting to JSON
* Switching to use payload
* Fixed issue with undefined pr
* Fixed non-mapping issue
* Removed the types
* Removed issue with run-jobs
* Put back the types
* chore: Make ready-for-e2e label check more robust
* fixed owner issue
* Try that again
* multi-step check for PR
* added catch
* Using the output from changes
* more fixes
* logging the sha
* Attemptig to fix the sha problem
* Cleanup
* Cleanup
* Testing with the same sha reference as checkout
* Reverted back
* cleanup
* chore: Improve CI workflow
* Made a new pre-merge flow that runs the builds and e2e
* Refactored back into 1 file
* Adding another condition for checking the ready-for-e2e
* syntax
* More syntax
* Change e2e-required to only run when ready so it doesn't fail
* A different attempt at getting the ready-for-e2e label
* Supporting PRs and workflow_dispatch
* logging the branch
* hardcoding to test
* Trying the rest call
* Added logging
* Check for the label in the same step
* More logging
* Added job-level output
* Reverted back to 'true'
* Moved the e2e required check into the main required check
* More logging
* Peeling the branch off of the ref
* Fix the ref
* Trying a separate workflow for labeling
* Updated name for the labeled file
* Checking label events to avoid unnecessary runs
* Got rid of the extra check to see if required should run
* Upgraded old actions running Node 16
* Updated the pre-reqs for running jobs
* Removed the dependency of API builds before starting E2E suites
* Removed extra production build used by analyze job
* Fixed the run-e2e check
* Using the pull request object when available
* Checking for null PR
* Added check for no event
---------
Co-authored-by: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com>
* chore: Removed duplicate production build
* fix references
* Move env vars to top level of e2e
* job renaming
* Added env vars to top level of all e2e jobs
* Removed part of cache key that causes issues and is moot
* Using buildjet hardware so the caching works
* clean up
* chore: Add build of API v2 to PR checks
* Actually added the v2 build to the pipeline...
* Added back the original yarn install
* Updated the main PR flow to require API builds before tests