From 90f962a886ecec6135f6d38656cb3f25fa46d949 Mon Sep 17 00:00:00 2001 From: Gaetan Craig-Riou Date: Fri, 16 Jan 2026 13:47:23 +1100 Subject: [PATCH] Use compiler_strategy mtime for test environment It fixes the issue for CI as it's faster than the digest strategy: https://github.com/shakacode/shakapacker/blob/main/docs/configuration.md#compiler_strategy --- .github/workflows/build.yml | 1 - config/ci_webpacker.yml | 34 ---------------------------------- config/webpacker.yml | 1 + 3 files changed, 1 insertion(+), 35 deletions(-) delete mode 100644 config/ci_webpacker.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d76df41de0..c6711bb01a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -148,7 +148,6 @@ jobs: - name: Run tests env: - WEBPACKER_CONFIG: "config/ci_webpacker.yml" KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC: ff2456e64c9f2aa5157eb0daf711d3c3 KNAPSACK_PRO_CI_NODE_TOTAL: ${{ matrix.ci_node_total }} KNAPSACK_PRO_CI_NODE_INDEX: ${{ matrix.ci_node_index }} diff --git a/config/ci_webpacker.yml b/config/ci_webpacker.yml deleted file mode 100644 index 425e975f13..0000000000 --- a/config/ci_webpacker.yml +++ /dev/null @@ -1,34 +0,0 @@ -# Note: You must restart bin/webpack-dev-server for changes to take effect - -default: &default - source_path: app/webpacker - source_entry_path: packs - public_root_path: public - public_output_path: packs - cache_path: tmp/cache/webpacker - webpack_compile_output: true - - # Additional paths webpack should look up modules - # ['app/assets', 'engine/foo/app/assets'] - additional_paths: [ - 'vendor', - 'app/webpacker/css', - 'app/webpacker/fonts', - 'app/webpacker/images', - 'engines/web/app/assets/stylesheets', - 'app/components' - ] - - # Reload manifest.json on all requests so we reload latest compiled packs - cache_manifest: false - - # Extract and emit a css file - extract_css: true - -test: - <<: *default - # Asset are precomiled on CI, so no need to compile here - compile: false - - # Compile test packs to a separate directory - public_output_path: packs-test diff --git a/config/webpacker.yml b/config/webpacker.yml index 19c3eeb903..565596797b 100644 --- a/config/webpacker.yml +++ b/config/webpacker.yml @@ -65,6 +65,7 @@ development: test: <<: *default compile: true + compiler_strategy: mtime # Compile test packs to a separate directory public_output_path: packs-test