-
Notifications
You must be signed in to change notification settings - Fork 81
58 lines (51 loc) · 1.42 KB
/
ci_backend.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
52
53
54
55
56
57
58
name: 'CI - Backend'
on:
push:
branches:
- main
- dev
- 'releases/**'
pull_request:
branches:
- main
- dev
- 'releases/**'
workflow_dispatch:
jobs:
build:
name: Backend - Build and Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
name: Check out repository
- uses: dorny/paths-filter@v2
id: changes
with:
filters: |
src:
- '.github/**'
- 'RetrospectiveExtension.Backend/**'
- 'RetrospectiveExtension.Backend.Tests/**'
- if: steps.changes.outputs.src == 'true'
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'
- if: steps.changes.outputs.src == 'true'
run: |
dotnet restore
dotnet build
name: Build
working-directory: 'RetrospectiveExtension.Backend'
- if: steps.changes.outputs.src == 'true'
run: |
dotnet test --logger "trx;LogFileName=test-results.trx"
name: Test
working-directory: 'RetrospectiveExtension.Backend.Tests'
- if: steps.changes.outputs.src == 'true'
name: Upload backend test report
uses: dorny/[email protected]
with:
name: Dotnet Tests
path: TestResults/test-results.trx
reporter: dotnet-trx
working-directory: 'RetrospectiveExtension.Backend.Tests'