Skip to content

Commit dba422f

Browse files
JonZeollaclaude
andcommitted
fix: bypass Task for Windows CI steps to avoid VERSION var evaluation
Task eagerly evaluates all top-level sh: vars including VERSION which uses a namespace-package import that fails on Windows. Run init, test, and build commands directly instead. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent c21c994 commit dba422f

1 file changed

Lines changed: 15 additions & 15 deletions

File tree

.github/workflows/ci.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -210,32 +210,32 @@ jobs:
210210
Write-Host "Windows smoke test passed: project generated and verified successfully"
211211
- name: Initialize generated project
212212
shell: bash
213-
# VERSION and LOCAL_PLATFORM are top-level Taskfile vars evaluated via
214-
# `uv run` shell commands. On Windows the namespace-package import
215-
# that resolves VERSION fails, so we supply both as env-var overrides.
216-
env:
217-
VERSION: '0.0.0'
218-
LOCAL_PLATFORM: 'linux/amd64'
213+
# Task's top-level VERSION var uses a namespace-package import that
214+
# fails on Windows, so we run the init commands directly.
219215
run: |
220216
cd "$RUNNER_TEMP/replace-me"
221217
uv sync --frozen --all-extras
222-
task -v init
223218
- name: Run tests
224219
shell: bash
225-
env:
226-
VERSION: '0.0.0'
227-
LOCAL_PLATFORM: 'linux/amd64'
228220
run: |
229221
cd "$RUNNER_TEMP/replace-me"
230-
task -v test
222+
uv run --frozen pytest -m "unit" tests/
223+
uv run --frozen pytest -m "integration" tests/
231224
- name: Build Docker image
232225
shell: bash
233-
env:
234-
VERSION: '0.0.0'
235-
LOCAL_PLATFORM: 'linux/amd64'
236226
run: |
237227
cd "$RUNNER_TEMP/replace-me"
238-
task -v build
228+
docker buildx create --name multiplatform --driver docker-container --use 2>/dev/null || true
229+
docker buildx build \
230+
--platform linux/amd64 \
231+
--pull \
232+
--load \
233+
--build-arg NAME="replace_me" \
234+
--build-arg DESCRIPTION="A brief description of the project" \
235+
--build-arg TIMESTAMP="$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
236+
--build-arg COMMIT_HASH="$(git rev-parse HEAD)" \
237+
-t zenable-io/replace-me:latest \
238+
.
239239
- name: Verify Docker image
240240
shell: bash
241241
run: |

0 commit comments

Comments
 (0)