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