-
Notifications
You must be signed in to change notification settings - Fork 65
78 lines (68 loc) · 2.57 KB
/
backend-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
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: Backend CI
# This workflow runs the unit tests and integration tests for the backend.
# Integration tests use real SQL database, but fortunately windows-latest
# image contains support for SQL Express localDb.
# This approach is significantly simpler than running it via docker-compose,
# although, yes, it's more prone to breaking, since it's not isolated.
on:
pull_request:
branches: [ master ]
push:
branches: [ master ]
workflow_dispatch:
jobs:
buildtest:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore -c Release
- name: Test
run: dotnet test --no-build -c Release --verbosity normal
/p:CollectCoverage=true
/p:Include="[MyWarehouse.Domain]*?%2c[MyWarehouse.Application]*?%2c[MyWarehouse.WebApi]*"
/p:CoverletOutput=.coverage/
/p:CoverletOutputFormat=lcov
env:
UserSeedSettings__SeedDefaultUser: false
AuthenticationSettings__JwtSigningKeyBase64: e09053f6847d466b8f243d9522c340ef234sdfds # Not actually used.
SwaggerSettings__UseSwagger: false
- name: DomainUnitTests Report Upload
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: DomainUnitTests
path-to-lcov: tests/Domain.UnitTests/.coverage/coverage.info
parallel: true
- name: ApplicationIntegrationTests Report Upload
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: ApplicationIntegrationTests
path-to-lcov: tests/Application.IntegrationTests/.coverage/coverage.info
parallel: true
- name: WebApiUnitTests Report Upload
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: WebApiUnitTests
path-to-lcov: tests/WebApi.UnitTests/.coverage/coverage.info
parallel: true
- name: ApplicationUnitTests Report Upload
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: ApplicationUnitTests
path-to-lcov: tests/Application.UnitTests/.coverage/coverage.info
parallel: true
- name: Conclude Coverage Upload
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true