Repository navigation
85 lines (72 loc) · 1.95 KB
/
Copy pathci.yml
File metadata and controls
85 lines (72 loc) · 1.95 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: CI
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
workflow_dispatch:
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
format:
name: Format
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Setup .NET
uses: actions/setup-dotnet@v6
with:
dotnet-version: 10.0.x
cache: true
cache-dependency-path: |
**/*.csproj
global.json
- name: Restore
run: dotnet restore Blueprints.sln
- name: Verify formatting
run: dotnet format Blueprints.sln --verify-no-changes --no-restore
build-and-test:
name: ${{ matrix.os }}
needs: format
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 25
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Setup .NET
uses: actions/setup-dotnet@v6
with:
dotnet-version: 10.0.x
cache: true
cache-dependency-path: |
**/*.csproj
global.json
- name: Restore
run: dotnet restore Blueprints.sln
- name: Build
run: dotnet build Blueprints.sln --configuration Release --no-restore
- name: Test
run: >-
dotnet test Blueprints.Tests/Blueprints.Tests.csproj
--configuration Release
--no-build
--logger "trx;LogFileName=tests.trx"
--results-directory TestResults
--collect "XPlat Code Coverage"
- name: Upload test results
if: always()
uses: actions/upload-artifact@v7
with:
name: test-results-${{ matrix.os }}
path: TestResults
if-no-files-found: warn
retention-days: 14