You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- name: Check lockfile is current with its manifest
102
-
run: |
103
-
if ! pixi lock --check --manifest-path "${{ matrix.manifest }}"; then
104
-
echo "::error::Lockfile is stale for '${{ matrix.manifest }}'. Regenerate with: pixi lock --manifest-path ${{ matrix.manifest }}. For default-branch dependency drift, maintainers can run ${REFRESH_WORKFLOW_URL}"
105
-
exit 1
106
-
fi
107
-
108
74
# `pixi lock --check` exits 0 on a semantically current lock even when it
109
75
# rewrites the file into the pinned version's canonical form (lockfile
110
76
# format upgrades, platform alias renames). Without this guard that drift
111
77
# is invisible: the check prints "Updated lock file" and still passes,
112
78
# while every later pixi run keeps rewriting the committed file (#2298).
if ! git diff --exit-code -- "${{ matrix.lockfile }}"; then
118
-
echo "::error::pixi ${PIXI_VERSION} rewrote ${{ matrix.lockfile }} during the check, so the committed bytes are not what it generates. Regenerate with pixi ${PIXI_VERSION}: pixi lock --manifest-path ${{ matrix.manifest }}. For default-branch dependency drift, maintainers can run ${REFRESH_WORKFLOW_URL}"
error("workspace inventory must be a non-empty array")
89
+
elif any(.[];
90
+
type != "object"
91
+
or (.manifest | type != "string")
92
+
or (.lockfile | type != "string")
93
+
or .manifest == ""
94
+
or .lockfile == ""
95
+
) then
96
+
error("each workspace must have non-empty string manifest and lockfile fields")
97
+
else
98
+
.[]
99
+
end
100
+
' <<<"${workspaces}"
101
+
)"
102
+
failed=0
103
+
104
+
while IFS= read -r workspace; do
105
+
manifest="$(jq -r '.manifest' <<<"${workspace}")"
106
+
lockfile="$(jq -r '.lockfile' <<<"${workspace}")"
107
+
echo "::group::pixi lock --check (${manifest})"
108
+
109
+
check_status=0
110
+
timeout --kill-after=1m "${WORKSPACE_TIMEOUT}" \
111
+
pixi lock --check --manifest-path "${manifest}" \
112
+
|| check_status=$?
113
+
if ((check_status == 124 || check_status == 137)); then
114
+
echo "::error::Timed out after ${WORKSPACE_TIMEOUT} while checking '${manifest}'."
115
+
failed=1
116
+
elif ((check_status != 0)); then
117
+
echo "::error::Lockfile is stale for '${manifest}'. Regenerate with: pixi lock --manifest-path ${manifest}. For default-branch dependency drift, maintainers can run ${REFRESH_WORKFLOW_URL}"
118
+
failed=1
119
+
elif ! git diff --exit-code -- "${lockfile}"; then
120
+
echo "::error::pixi ${PIXI_VERSION} rewrote ${lockfile} during the check, so the committed bytes are not what it generates. Regenerate with pixi ${PIXI_VERSION}: pixi lock --manifest-path ${manifest}. For default-branch dependency drift, maintainers can run ${REFRESH_WORKFLOW_URL}"
0 commit comments