-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (43 loc) · 1.2 KB
/
build-test.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Build and Test Action
on:
push:
branches:
- main
- develop
pull_request:
types:
- opened
- synchronize
jobs:
build:
name: Build and Test
runs-on: ubuntu-latest
permissions:
checks: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: dotnet restore
run: |
dotnet tool restore
dotnet restore
- name: Build
run: |
dotnet build --no-restore --configuration Release
- name: Run unit tests
run: |
dotnet test --no-build --settings=unit_tests.runsettings --collect:"XPlat Code Coverage" --logger "trx;LogFileName=TestResults.xml"
- name: Run integration tests
run: |
dotnet test --no-build --settings=integration_tests.runsettings --logger "trx;LogFileName=TestResults.xml"
- name: Publish test results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
files: |
./**/TestResults.xml
- name: Upload test coverage report
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}