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
This commit is contained in:
Gaetan Craig-Riou
2026-01-16 13:47:23 +11:00
parent 82f6484031
commit 90f962a886
3 changed files with 1 additions and 35 deletions

View File

@@ -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 }}

View File

@@ -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

View File

@@ -65,6 +65,7 @@ development:
test:
<<: *default
compile: true
compiler_strategy: mtime
# Compile test packs to a separate directory
public_output_path: packs-test