-
Notifications
You must be signed in to change notification settings - Fork 3
30 lines (28 loc) · 857 Bytes
/
ci.yml
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
name: Build and Test - CI
on:
push:
branches:
- main
# Allow manually triggering
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Git Versioning requires a non-shallow clone
- name: Setup .NET
uses: actions/setup-dotnet@v4
- name: Restore
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --configuration Release --no-build --logger trx --results-directory TestResults --collect:"XPlat Code Coverage"
- name: Upload test results
uses: actions/upload-artifact@v4
with:
name: test-results
path: ./TestResults
if: ${{ always() }} # Always run this step even on failure