Skip to content

Commit d015aba

Browse files
authored
Check incremental re-builds in CI (#123)
2 parents 1a81aa3 + 4f4ebe2 commit d015aba

2 files changed

Lines changed: 23 additions & 4 deletions

File tree

.github/workflows/build.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,21 @@ jobs:
2727
run: dotnet workload install wasm-tools wasm-experimental
2828

2929
- name: Build
30-
run: dotnet build -warnaserror -p:TreatWarningsAsErrors=true
30+
id: build
31+
run: dotnet build -warnaserror -p:TreatWarningsAsErrors=true -bl:build.binlog
32+
33+
- name: Incremental re-build
34+
run: dotnet build -warnaserror -p:TreatWarningsAsErrors=true -question -bl:question.binlog
3135

3236
- name: Test
33-
run: dotnet test --no-build
37+
if: ${{ always() && steps.build.outcome == 'success' }}
38+
run: dotnet test --no-build --report-xunit
39+
40+
- name: Upload logs
41+
if: always()
42+
uses: actions/upload-artifact@v6
43+
with:
44+
name: logs
45+
path: |
46+
*.binlog
47+
**/TestResults/*.*

src/App/App.csproj

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,14 @@
3737
<NpmInput Include="Npm\**" Exclude="Npm\node_modules\**;Npm\package-lock.json" />
3838
<NpmOutput Include="wwwroot\js\jslib.js" />
3939

40+
<!--
41+
Ignore content generated by npm as it's not picked up by clean builds anyway,
42+
only by rebuilds, but a rebuild immediately after a clean build wouldn't be incremental.
43+
-->
44+
<Content Remove="wwwroot\js\jslib.js*" />
45+
<None Remove="wwwroot\js\jslib.js*" />
46+
4047
<!-- Mark as Content so it's included in `service-worker-assets.js`. -->
41-
<None Remove="@(NpmOutput)" />
42-
<Content Remove="@(NpmOutput)" />
4348
<Content Include="@(NpmOutput)" />
4449
</ItemGroup>
4550

0 commit comments

Comments
 (0)