-
-
Notifications
You must be signed in to change notification settings - Fork 3
39 lines (36 loc) · 1.11 KB
/
test.yaml
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
name: Test
on:
pull_request:
# Added 'edited' temporarily, as there currently is no trigger for when the base branch is updated.
# https://github.com/orgs/community/discussions/64119
types: [opened, synchronize, reopened, ready_for_review, closed, edited]
branches: main
push:
branches: main
workflow_dispatch: {}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
if: github.event.pull_request.draft == false
steps:
- name: 📑 Checkout
uses: actions/checkout@v4
- name: ⚙️ Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9
- name: 🧪 Test
run: dotnet test --collect:"XPlat Code Coverage" --logger "console;verbosity=detailed"
- name: 📄 Upload Code Coverage to CodeCov
uses: codecov/codecov-action@v5
with:
files: '**/coverage.cobertura.xml'
fail_ci_if_error: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}