ci: key the WASM cache on what actually changes the modules

The test plugins are separate Go modules with their own go.mod and go.sum;
they reach the PDK through a replace directive and never read the root
module. So the root go.sum has no bearing on the wasm bytes, and the wazero
version it pins is already namespaced by wazero itself, which stores entries
under wazero-<version>-<goarch>-<goos>. Keying on it only rotated the cache
on every unrelated dependency bump.

Drop it, and add the go.mod files that were missing: the test plugins' own
and the PDK's. The root go.mod stays, since it selects the toolchain that
builds the modules.
This commit is contained in:
Deluan 2026-08-30 15:49:12 -04:00
parent a7a8df9e9b
commit 108ae0f6e7

View File

@ -143,7 +143,7 @@ jobs:
uses: actions/cache@v6
with:
path: plugins/testdata/.wazero-cache
key: wazero-${{ runner.os }}-${{ hashFiles('plugins/testdata/*/*.go', 'plugins/testdata/*/go.sum', 'plugins/pdk/go/**/*.go', 'go.mod', 'go.sum') }}
key: wazero-${{ runner.os }}-${{ hashFiles('plugins/testdata/*/*.go', 'plugins/testdata/*/go.*', 'plugins/pdk/go/**/*.go', 'plugins/pdk/go/go.*', 'go.mod') }}
restore-keys: wazero-${{ runner.os }}-
- name: Test