Skip to content

Commit ec10b64

Browse files
HandyS11claude
andcommitted
ci: add CI workflow (build, ReSharper format check, test + coverage)
Adapted from the shared sample: builds Release on ubuntu + windows, runs the ReSharper ReformatAndReorder gate (matching the local pre-push hook), and runs the test suite with Cobertura coverage. Triggers on pushes to develop and on PRs. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 7ab18ab commit ec10b64

1 file changed

Lines changed: 54 additions & 0 deletions

File tree

.github/workflows/CI.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: CI
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
push:
8+
branches:
9+
- develop
10+
pull_request:
11+
12+
jobs:
13+
build:
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
matrix:
17+
os: [ ubuntu-latest, windows-latest ]
18+
fail-fast: false
19+
steps:
20+
- uses: actions/checkout@v6
21+
22+
- name: Setup .NET
23+
uses: actions/setup-dotnet@v5
24+
with:
25+
dotnet-version: '10.0.x'
26+
cache: true
27+
cache-dependency-path: Directory.Packages.props
28+
29+
- name: Restore dependencies
30+
run: dotnet restore
31+
32+
- name: Build
33+
run: dotnet build --no-restore --configuration Release
34+
35+
- name: Restore tools
36+
if: matrix.os == 'ubuntu-latest'
37+
run: dotnet tool restore
38+
39+
- name: Check formatting (ReSharper)
40+
if: matrix.os == 'ubuntu-latest'
41+
run: |
42+
dotnet jb cleanupcode RustPlusBot.slnx --profile="ReformatAndReorder" --no-build --verbosity=ERROR
43+
git diff --exit-code
44+
45+
- name: Test
46+
run: dotnet test --no-build --configuration Release --verbosity normal --collect:"XPlat Code Coverage" --results-directory ./coverage
47+
48+
- name: Upload coverage reports
49+
if: matrix.os == 'ubuntu-latest'
50+
uses: actions/upload-artifact@v7
51+
with:
52+
name: coverage-reports
53+
path: ./coverage/**/coverage.cobertura.xml
54+
retention-days: 14

0 commit comments

Comments
 (0)