CI: use cache#34105
Open
EugeniyKiyashko wants to merge 9 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Enable Nx local caching in CI/build scripts to speed up repeated builds and test runs across the DevExtreme monorepo workflows.
Changes:
- Removed
--skipNxCachefrom build scripts and enabled caching for key Nx targets. - Added
.nx/cachepersistence via GitHub Actions cache in multiple workflows and introduced workflow-level concurrency cancellation for some pipelines. - Refined demo lint targets/inputs and increased default TestCafe concurrency.
Reviewed changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 21 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/scripts/build-all.ts | Removes forced cache bypass for build-dist and themebuilder build to allow Nx caching. |
| packages/devextreme/project.json | Marks build and build-dist targets as cacheable. |
| packages/devextreme-themebuilder/project.json | Expands inputs/outputs for themebuilder build and enables caching. |
| e2e/testcafe-devextreme/runner.ts | Increases default TestCafe runner concurrency. |
| apps/demos/project.json | Refines lint target inputs, adds lint-demos, and excludes large artifact folders from lint-html inputs. |
| apps/demos/package.json | Switches lint to Nx run-many including the new lint-demos target. |
| apps/demos/.prettierignore | Ignores testing/artifacts to avoid formatting generated artifacts. |
| .github/workflows/wrapper_tests.yml | Adds concurrency cancellation and Nx cache restore/save. |
| .github/workflows/wrapper_tests_e2e.yml | Adds Nx cache restore/save. |
| .github/workflows/visual-tests-demos.yml | Adds Nx cache restore/save; adjusts jQuery matrix generation and concurrency. |
| .github/workflows/testcafe_tests.yml | Adds Nx cache restore/save; generates matrix dynamically and tweaks TestCafe args. |
| .github/workflows/themebuilder_tests.yml | Adds Nx cache restore/save. |
| .github/workflows/styles.yml | Adds Nx cache restore/save. |
| .github/workflows/renovation.yml | Adds Nx cache restore/save. |
| .github/workflows/qunit_tests.yml | Adds Nx cache restore/save. |
| .github/workflows/publish-demos.yml | Adds Nx cache restore/save. |
| .github/workflows/pr-storybook-deploy.yml | Splits pnpm vs Nx cache steps and adds Nx cache restore/save. |
| .github/workflows/pr-storybook-deploy-manual.yml | Adds Nx cache restore/save. |
| .github/workflows/playgrounds_tests.yml | Adds Nx cache restore/save to build and matrix test jobs. |
| .github/workflows/lint.yml | Adds Nx cache restore/save across lint jobs. |
| .github/workflows/demos_unit_tests.yml | Adds Nx cache restore/save. |
| .github/workflows/default_workflow.yml | Adds Nx cache restore/save. |
| .github/workflows/build_all.yml | Adds concurrency cancellation and Nx cache restore/save. |
Comment on lines
+102
to
106
| "{projectRoot}/**/*.css", | ||
| "{projectRoot}/**/*.vue", | ||
| "{projectRoot}/.stylelintrc.json", | ||
| "{projectRoot}/.stylelintignore" | ||
| ] |
Comment on lines
+254
to
+259
| TZVAL="${{ matrix.timezone }}" | ||
| [ -z "$TZVAL" ] && TZVAL="GMT" | ||
| # A job stays green if it has no more than --deferThreshold failures: | ||
| # those tests are recorded and handed to the dedicated "retry-unstable" | ||
| # job. More failures than that fail the job as a real regression. | ||
| all_args="--browsers=chrome:devextreme-shr2 --componentFolder ${{ matrix.componentFolder }} $CONCURRENCY $INDICES $PLATFORM $THEME $CACHE --deferThreshold 3 --timezone $TZVAL" |
Comment on lines
69
to
75
| - uses: actions/cache@v5 | ||
| name: Setup pnpm cache | ||
| with: | ||
| path: | | ||
| ${{ env.STORE_PATH }} | ||
| .nx/cache | ||
| path: ${{ env.STORE_PATH }} | ||
| key: ${{ runner.os }}-pnpm-cache-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-pnpm-cache |
Comment on lines
+250
to
+259
| [ "${{ matrix.indices }}" != "" ] && INDICES="--indices ${{ matrix.indices }}" | ||
| [ "${{ matrix.concurrency }}" != "" ] && CONCURRENCY="--concurrency ${{ matrix.concurrency }}" | ||
| [ "${{ matrix.platform }}" != "" ] && PLATFORM="--platform ${{ matrix.platform }}" | ||
| [ "${{ matrix.cache }}" == "true" ] && CACHE="--cache true" | ||
| TZVAL="${{ matrix.timezone }}" | ||
| [ -z "$TZVAL" ] && TZVAL="GMT" | ||
| # A job stays green if it has no more than --deferThreshold failures: | ||
| # those tests are recorded and handed to the dedicated "retry-unstable" | ||
| # job. More failures than that fail the job as a real regression. | ||
| all_args="--browsers=chrome:devextreme-shr2 --componentFolder ${{ matrix.componentFolder }} $CONCURRENCY $INDICES $PLATFORM $THEME $CACHE --deferThreshold 3 --timezone $TZVAL" |
Comment on lines
+241
to
+243
| env: | ||
| NODE_OPTIONS: --max-old-space-size=8192 | ||
| RUN_LABEL: ${{ matrix.name }} |
Comment on lines
101
to
106
| "inputs": [ | ||
| "{projectRoot}/Demos/**/*.css", | ||
| "{projectRoot}/Demos/**/*.vue", | ||
| "{projectRoot}/Demos/.stylelintrc.json" | ||
| "{projectRoot}/**/*.css", | ||
| "{projectRoot}/**/*.vue", | ||
| "{projectRoot}/.stylelintrc.json", | ||
| "{projectRoot}/.stylelintignore" | ||
| ] |
Comment on lines
+114
to
118
| "{projectRoot}/**/*", | ||
| "!{projectRoot}/coverage/**/*", | ||
| "!{projectRoot}/publish-demos/**/*", | ||
| "!{projectRoot}/testing/artifacts/**/*" | ||
| ] |
| "{projectRoot}/js/__internal/core/localization/cldr-data", | ||
| "{projectRoot}/js/__internal/core/localization/default_messages.ts" | ||
| ], | ||
| "cache": true, |
| "{projectRoot}/scss/bundles" | ||
| ] | ||
| ], | ||
| "cache": true |
Comment on lines
+20
to
26
| "{workspaceRoot}/packages/devextreme/package.json", | ||
| "{workspaceRoot}/packages/devextreme-scss/build/**/*", | ||
| "{workspaceRoot}/packages/devextreme-scss/fonts/**/*", | ||
| "{workspaceRoot}/packages/devextreme-scss/icons/**/*", | ||
| "{workspaceRoot}/packages/devextreme-scss/images/**/*", | ||
| "{workspaceRoot}/packages/devextreme-scss/scss/**/*" | ||
| ], |
| "outputs": ["{projectRoot}/artifacts/js/dx.aspnet.mvc.js"] | ||
| }, | ||
| "build:declarations": { | ||
| "cache": true, |
Comment on lines
20
to
22
| function defaultConcurrency() { | ||
| if (FRAMEWORK === 'jQuery') return Math.max(2, Math.min(8, CORES)); | ||
| if (FRAMEWORK === 'jQuery') return Math.max(6, Math.min(8, CORES)); | ||
| if (USE_BUNDLED) return Math.max(2, Math.min(8, CORES)); |
Comment on lines
+10
to
+12
| concurrency: | ||
| group: wf-${{github.event.pull_request.number || github.sha}}-${{github.workflow}} | ||
| cancel-in-progress: true |
Comment on lines
+17
to
+19
| concurrency: | ||
| group: wf-${{github.event.pull_request.number || github.sha}}-${{github.workflow}} | ||
| cancel-in-progress: true |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.