Skip to content

Commit 7415919

Browse files
authored
Consolidate Windows and Linux builds into unified workflow (#180)
1 parent c523a17 commit 7415919

File tree

6 files changed

+17
-35
lines changed

6 files changed

+17
-35
lines changed

.github/settings.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ branches:
6161
required_pull_request_reviews: null
6262
required_status_checks:
6363
strict: false
64-
contexts: ['Build & Test', 'Build & Test (Windows)']
64+
contexts: ['Build & Test (ubuntu-latest)', 'Build & Test (windows-latest)']
6565
enforce_admins: false
6666
required_linear_history: false
6767
restrictions: null

.github/workflows/build-win.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

.github/workflows/build.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ on:
1010
jobs:
1111
build:
1212
name: Build & Test
13-
runs-on: ubuntu-24.04
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
matrix:
16+
os: [ubuntu-latest, windows-latest]
1417

1518
steps:
1619
- name: Checkout
@@ -22,14 +25,21 @@ jobs:
2225
dotnet-version: |
2326
6.0.x
2427
8.0.x
28+
10.0.x
2529
2630
- name: Build
2731
run: dotnet build -c Release
2832

33+
- name: Run tests without Coverage
34+
if: startsWith(matrix.os, 'windows')
35+
run: dotnet test --no-build -c Release -p:CollectCoverage=false
36+
2937
- name: Run tests with Coverage
38+
if: startsWith(matrix.os, 'ubuntu')
3039
run: dotnet test --no-build -c Release -p:CollectCoverage=true -e:CoverletOutputFormat=opencover
3140

3241
- name: Publish to Codecov
42+
if: startsWith(matrix.os, 'ubuntu')
3343
uses: codecov/codecov-action@v5
3444
with:
3545
fail_ci_if_error: true

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
pack:
1717
name: Create NuGet packages
1818
needs: [build]
19-
runs-on: ubuntu-24.04
19+
runs-on: ubuntu-latest
2020
steps:
2121
- name: Checkout
2222
uses: actions/checkout@v6
@@ -47,7 +47,7 @@ jobs:
4747
github:
4848
name: Deploy to GitHub
4949
needs: [pack]
50-
runs-on: ubuntu-24.04
50+
runs-on: ubuntu-latest
5151
steps:
5252
- name: Download artifacts
5353
uses: actions/download-artifact@v6
@@ -64,7 +64,7 @@ jobs:
6464
name: Create GitHub release
6565
needs: [pack]
6666
if: startsWith(github.ref, 'refs/tags/v')
67-
runs-on: ubuntu-24.04
67+
runs-on: ubuntu-latest
6868
steps:
6969
- name: Checkout
7070
uses: actions/checkout@v6
@@ -82,7 +82,7 @@ jobs:
8282
name: Deploy to NuGet
8383
needs: [release]
8484
if: startsWith(github.ref, 'refs/tags/v')
85-
runs-on: ubuntu-24.04
85+
runs-on: ubuntu-latest
8686
steps:
8787
- name: Download artifacts
8888
uses: actions/download-artifact@v6

.github/workflows/labeled.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ permissions:
1313
jobs:
1414
automerge:
1515
name: Enable auto-merge
16-
runs-on: ubuntu-24.04
16+
runs-on: ubuntu-latest
1717
if: github.actor == 'phnx47-bot' && contains(github.event.pull_request.labels.*.name, 'sync')
1818
steps:
1919
- name: Checkout

icon.png

-2.49 KB
Loading

0 commit comments

Comments
 (0)