Skip to content

Commit 7fe61d5

Browse files
Fix Copilot setup workflow tool ordering (#1032)
## Summary - move Copilot environment setup steps ahead of restore/build/test so Node.js, Docker Buildx, and dotnet-ef are available before validation runs - keep Node 24 aligned with the frontend engine requirement before `dotnet build` triggers `npm ci` - make the dotnet-ef installation step idempotent and explicitly run under bash ## Why The failing Copilot agent run showed the setup workflow running `dotnet build` before `actions/setup-node`, and the Copilot setup docs state that if a setup step fails, the remaining setup steps are skipped. Because the web project runs `npm ci` during build and requires Node >=22, the agent could reach its task with Node setup skipped. ## Validation - `dotnet restore /p:AccessToNugetFeed=false` - `dotnet build --configuration Release --no-restore /p:AccessToNugetFeed=false` - `dotnet test --no-build --configuration Release` *(still has the pre-existing failures in `CaptchaService_Verify_Success` and `KnownBreachedPassword_IsDetected`)* - `python` YAML parse of `.github/workflows/copilot-setup-steps.yml` - `dotnet build /home/runner/work/EssentialCSharp.Web/EssentialCSharp.Web/EssentialCSharp.Web/EssentialCSharp.Web.csproj --configuration Release --no-restore /p:AccessToNugetFeed=false` after removing `EssentialCSharp.Web/node_modules` - `parallel_validation` (Code Review + CodeQL security scan) --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: BenjaminMichaelis <22186029+BenjaminMichaelis@users.noreply.github.com>
1 parent f56a684 commit 7fe61d5

1 file changed

Lines changed: 18 additions & 16 deletions

File tree

.github/workflows/copilot-setup-steps.yml

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ jobs:
2828
env:
2929
NUGET_AUTH_TOKEN: ${{ secrets.AZURE_DEVOPS_PAT }}
3030

31+
- name: Set up Node.js for frontend development
32+
uses: actions/setup-node@v6
33+
with:
34+
node-version: '24'
35+
3136
- name: Set up dependency caching for faster builds
3237
uses: actions/cache@v5
3338
id: nuget-cache
@@ -40,6 +45,19 @@ jobs:
4045
${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
4146
${{ runner.os }}-nuget-
4247
48+
- name: Set up Docker Buildx
49+
uses: docker/setup-buildx-action@v4
50+
51+
- name: Install additional development tools
52+
shell: bash
53+
run: |
54+
echo "Installing additional tools for Copilot agent environment..."
55+
if dotnet tool list --global | grep -q 'dotnet-ef'; then
56+
dotnet tool update --global dotnet-ef
57+
else
58+
dotnet tool install --global dotnet-ef
59+
fi
60+
4361
- name: Restore with dotnet
4462
run: dotnet restore
4563

@@ -48,19 +66,3 @@ jobs:
4866

4967
- name: Run .NET Tests
5068
run: dotnet test --no-build --configuration Release
51-
52-
- name: Set up Docker Buildx
53-
uses: docker/setup-buildx-action@v4
54-
55-
- name: Set up Node.js for frontend development
56-
uses: actions/setup-node@v6
57-
with:
58-
node-version: '24'
59-
60-
- name: Install additional development tools
61-
run: |
62-
# Install common development tools that Copilot agents might need
63-
echo "Installing additional tools for Copilot agent environment..."
64-
65-
# Install EF Core tools globally
66-
dotnet tool install --global dotnet-ef

0 commit comments

Comments
 (0)