Skip to content

Commit 8ebda2b

Browse files
meziantouCopilot
andcommitted
Split dotnet run into build + run --no-build in CI
Separate the restore/build step from the generator execution so CI logs clearly show where time is spent (build vs runtime). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent ee4d01e commit 8ebda2b

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ jobs:
2323
uses: actions/setup-dotnet@v5
2424
- name: Copy README before generation
2525
run: Copy-Item README.md README.md.before
26-
- run: dotnet run --project Meziantou.Polyfill.Generator/Meziantou.Polyfill.Generator.csproj
26+
- run: dotnet build Meziantou.Polyfill.Generator/Meziantou.Polyfill.Generator.csproj
27+
- run: dotnet run --no-build --project Meziantou.Polyfill.Generator/Meziantou.Polyfill.Generator.csproj
2728
- name: Validate README is up to date
2829
run: |
2930
# Normalize line endings for comparison
@@ -45,7 +46,8 @@ jobs:
4546
- uses: actions/checkout@v6
4647
- name: Setup .NET Core
4748
uses: actions/setup-dotnet@v5
48-
- run: dotnet run --project Meziantou.Polyfill.Generator/Meziantou.Polyfill.Generator.csproj
49+
- run: dotnet build Meziantou.Polyfill.Generator/Meziantou.Polyfill.Generator.csproj
50+
- run: dotnet run --no-build --project Meziantou.Polyfill.Generator/Meziantou.Polyfill.Generator.csproj
4951
- run: dotnet pack Meziantou.Polyfill --configuration Release
5052

5153
- uses: actions/upload-artifact@v7
@@ -96,7 +98,8 @@ jobs:
9698
- uses: actions/checkout@v6
9799
- name: Setup .NET
98100
uses: actions/setup-dotnet@v5
99-
- run: dotnet run --project Meziantou.Polyfill.Generator/Meziantou.Polyfill.Generator.csproj
101+
- run: dotnet build Meziantou.Polyfill.Generator/Meziantou.Polyfill.Generator.csproj
102+
- run: dotnet run --no-build --project Meziantou.Polyfill.Generator/Meziantou.Polyfill.Generator.csproj
100103
- run: dotnet test Meziantou.Polyfill.SourceGenerator.Tests
101104

102105
tests:
@@ -112,7 +115,8 @@ jobs:
112115
dotnet-version: |
113116
9.0.x
114117
8.0.x
115-
- run: dotnet run --project Meziantou.Polyfill.Generator/Meziantou.Polyfill.Generator.csproj
118+
- run: dotnet build Meziantou.Polyfill.Generator/Meziantou.Polyfill.Generator.csproj
119+
- run: dotnet run --no-build --project Meziantou.Polyfill.Generator/Meziantou.Polyfill.Generator.csproj
116120
- run: dotnet test Meziantou.Polyfill.Tests
117121

118122
deploy:

0 commit comments

Comments
 (0)