-
-
Notifications
You must be signed in to change notification settings - Fork 2
54 lines (45 loc) · 1.26 KB
/
steps.dotnet-build-test.yml
File metadata and controls
54 lines (45 loc) · 1.26 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
on:
workflow_call:
inputs:
runs-on:
required: false
type: string
default: 'ubuntu-latest'
version:
required: true
type: string
permissions: read-all
jobs:
build_test:
runs-on: ${{ inputs.runs-on }}
steps:
- name: 🔄 Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
lfs: true
fetch-depth: 0
- name: 🛠️ Setup .NET
uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5.2.0
with:
global-json-file: global.json
- name: 🔧 Restore .NET Tools
run: dotnet tool restore
- name: 🔧 Restore dependencies
run: dotnet restore
- name: 🏗 Build
run: dotnet build --configuration Release --no-restore
- name: 🧪 Test .NET
id: test
run: |
dotnet test --no-build `
--configuration Release `
--logger trx `
--collect:"XPlat Code Coverage" `
--results-directory testresults
shell: pwsh
- name: 📤 Upload Test And Coverage Results
uses: actions/upload-artifact@v7
if: always() # run this step even if previous step failed
with:
name: ${{ inputs.runs-on }}
path: testresults