Skip to content

Commit dc26963

Browse files
committed
Fix workflow validation errors
1 parent 0a58df4 commit dc26963

File tree

3 files changed

+18
-10
lines changed

3 files changed

+18
-10
lines changed

.github/steps/install_dependencies/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Install Dependencies
2-
description: ""
2+
description: "Install the pinned .NET SDK, required host prerequisites, and Uno workloads for CI validation."
33

44
inputs:
55
target-platform:

.github/workflows/ci.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ jobs:
2727
quality:
2828
name: Quality
2929
runs-on: windows-latest
30-
timeout-minutes: ${{ fromJSON(env.STEP_TIMEOUT_MINUTES) }}
30+
timeout-minutes: 60
3131
steps:
3232
- uses: actions/checkout@v4
3333
with:
3434
fetch-depth: 0
3535

3636
- name: Install Dependencies
37-
timeout-minutes: ${{ fromJSON(env.STEP_TIMEOUT_MINUTES) }}
37+
timeout-minutes: 60
3838
uses: "./.github/steps/install_dependencies"
3939

4040
- name: Format
@@ -52,14 +52,14 @@ jobs:
5252
unit_tests:
5353
name: Unit Tests
5454
runs-on: windows-latest
55-
timeout-minutes: ${{ fromJSON(env.STEP_TIMEOUT_MINUTES) }}
55+
timeout-minutes: 60
5656
steps:
5757
- uses: actions/checkout@v4
5858
with:
5959
fetch-depth: 0
6060

6161
- name: Install Dependencies
62-
timeout-minutes: ${{ fromJSON(env.STEP_TIMEOUT_MINUTES) }}
62+
timeout-minutes: 60
6363
uses: "./.github/steps/install_dependencies"
6464

6565
- name: Run Unit Tests
@@ -69,14 +69,14 @@ jobs:
6969
coverage:
7070
name: Coverage
7171
runs-on: windows-latest
72-
timeout-minutes: ${{ fromJSON(env.STEP_TIMEOUT_MINUTES) }}
72+
timeout-minutes: 60
7373
steps:
7474
- uses: actions/checkout@v4
7575
with:
7676
fetch-depth: 0
7777

7878
- name: Install Dependencies
79-
timeout-minutes: ${{ fromJSON(env.STEP_TIMEOUT_MINUTES) }}
79+
timeout-minutes: 60
8080
uses: "./.github/steps/install_dependencies"
8181

8282
- name: Run Coverage
@@ -86,14 +86,14 @@ jobs:
8686
ui_tests:
8787
name: UI Tests
8888
runs-on: windows-latest
89-
timeout-minutes: ${{ fromJSON(env.STEP_TIMEOUT_MINUTES) }}
89+
timeout-minutes: 60
9090
steps:
9191
- uses: actions/checkout@v4
9292
with:
9393
fetch-depth: 0
9494

9595
- name: Install Dependencies
96-
timeout-minutes: ${{ fromJSON(env.STEP_TIMEOUT_MINUTES) }}
96+
timeout-minutes: 60
9797
uses: "./.github/steps/install_dependencies"
9898

9999
- name: Run UI Tests
@@ -103,7 +103,7 @@ jobs:
103103
desktop_artifacts:
104104
name: Desktop Artifact (${{ matrix.name }})
105105
runs-on: ${{ matrix.runner }}
106-
timeout-minutes: ${{ fromJSON(env.STEP_TIMEOUT_MINUTES) }}
106+
timeout-minutes: 60
107107
strategy:
108108
fail-fast: false
109109
matrix:

ci-pr-validation.plan.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ Fix the GitHub Actions CI path used by `managedcode/dotPilot` so it builds with
103103
- Local `dotnet build DotPilot.slnx` and `dotnet test DotPilot.Tests/DotPilot.Tests.csproj` already passed, which confirmed the primary CI break was the workflow toolchain path rather than product code.
104104
- Local `dotnet test DotPilot.Tests/DotPilot.Tests.csproj --collect:"XPlat Code Coverage"` reproduced a second blocker: coverage did not crash, but `coverlet.collector` spent minutes instrumenting generated Uno artifacts before test execution began, which was not acceptable for PR validation.
105105
- The workflow also lacked any desktop publish stage, so pull requests produced no downloadable app artifacts for human verification across macOS, Windows, and Linux.
106+
- After the first PR push, GitHub rejected the new workflow before any jobs started because `timeout-minutes` used `fromJSON(env.STEP_TIMEOUT_MINUTES)` at the job level, where the `env` context is not available during workflow validation.
106107

107108
## Failing Tests And Checks Tracker
108109

@@ -130,6 +131,12 @@ Fix the GitHub Actions CI path used by `managedcode/dotPilot` so it builds with
130131
Intended fix path: add a stable matrix job that publishes `net10.0-desktop` on `macos-latest`, `windows-latest`, and `ubuntu-latest`, then uploads the publish directories as artifacts.
131132
Status: fixed by the `Desktop Artifact` matrix job in `.github/workflows/ci.yml`.
132133

134+
- [x] `Workflow validation: instant failure before any CI jobs were created`
135+
Failure symptom: the first pushed branch run failed in `0s` with no jobs or logs.
136+
Suspected cause: GitHub Actions rejected the workflow because job-level `timeout-minutes` referenced `env`, which is not an allowed context at workflow-validation time.
137+
Intended fix path: replace the dynamic timeout expression with literal timeout values and lint the workflow locally before pushing again.
138+
Status: fixed by the literal `timeout-minutes: 60` update and local `actionlint` validation.
139+
133140
## Validation Notes
134141

135142
- `dotnet format DotPilot.slnx --verify-no-changes` passed.
@@ -140,6 +147,7 @@ Fix the GitHub Actions CI path used by `managedcode/dotPilot` so it builds with
140147
- `dotnet test DotPilot.UITests/DotPilot.UITests.csproj` passed with `6` UI tests green and `0` skipped.
141148
- `dotnet test DotPilot.slnx` passed and included both the unit and UI suites.
142149
- `dotnet publish DotPilot/DotPilot.csproj -c Release -f net10.0-desktop` passed locally on macOS and produced a publish directory under `artifacts/local-macos-publish`.
150+
- `actionlint .github/workflows/ci.yml` initially failed on invalid job-level `env` usage for `timeout-minutes`; after the fix it passed locally.
143151
- GitHub repository ruleset `Require Full CI Validation` was created in active mode and initially required `Quality`, `Unit Tests`, `Coverage`, and `UI Tests` on the default branch and `refs/heads/release/*`; it now also needs the new desktop artifact checks after the workflow is pushed and verified.
144152

145153
## Final Validation Skills

0 commit comments

Comments
 (0)