Commit 73bc825
fix: move test coverage collection before packaging phase
Test coverage collection needs access to _deps/ directory to run
`go tool cover -func`, which internally calls `go list` for module
dependency resolution.
Previously (commit cdb2518), test coverage was moved after packaging
to maintain ordering with provenance handling. However, the packaging
phase removes _deps/ for deterministic builds, causing test coverage
to fail with "cannot load module _deps/api-go--lib".
This fix moves test coverage back to before packaging, restoring the
v0.13.2 behavior. This satisfies all requirements:
- Test coverage has access to _deps/ for go list
- SBOM generation has access to _deps/ for scanning
- Packaging removes _deps/ for deterministic tar.gz
- Provenance computes subjects from final artifact (no _deps/)
The build order is now:
1. SBOM generation (needs _deps/)
2. Test coverage collection (needs _deps/)
3. Package phase (removes _deps/)
4. Provenance handling (accurate subjects without _deps/)
Related commits:
- cdb2518: "fix: move provenance handling after packaging phase"
- b5584c5: "Fix go coverage collection by removing deps in packaging"
Co-authored-by: Ona <[email protected]>1 parent 27734d1 commit 73bc825
1 file changed
+12
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1058 | 1058 | | |
1059 | 1059 | | |
1060 | 1060 | | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
1061 | 1073 | | |
1062 | 1074 | | |
1063 | 1075 | | |
| |||
1080 | 1092 | | |
1081 | 1093 | | |
1082 | 1094 | | |
1083 | | - | |
1084 | | - | |
1085 | | - | |
1086 | | - | |
1087 | | - | |
1088 | | - | |
1089 | | - | |
1090 | | - | |
1091 | | - | |
1092 | | - | |
1093 | | - | |
1094 | | - | |
1095 | 1095 | | |
1096 | 1096 | | |
1097 | 1097 | | |
| |||
0 commit comments