-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (44 loc) · 1.41 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
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Tests
on:
workflow_dispatch:
pull_request:
branches:
- main
jobs:
tests:
name: Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Start containers
run: docker-compose -f env/mongo/docker-compose.yaml up -d
# .NET Tests
- name: Build .NET
uses: ./.github/actions/dotnet
with:
version: ${{ steps.release-version.outputs.next-version }}${{ github.event.inputs.version && 'pre' || '' }}
- name: Test .NET Solution
working-directory: src
shell: bash
run: dotnet test -c Release /p:CollectCoverage=true -m:1
env:
COSMOS_CONNECTION_STRING: ${{ secrets.COSMOS_CONNECTION_STRING }}
COSMOS_DATABASE_NAME: infrastructuredbtests
- name: Stop containers
# the containers should be stopped regardless of
# the test result
if: always()
run: docker-compose -f env/mongo/docker-compose.yaml down
- name: Code Coverage Summary Report
uses: irongut/[email protected]
with:
filename: src/coverage.cobertura.xml
badge: true
format: 'markdown'
output: 'both'
- name: Add Coverage PR Comment
uses: marocchino/sticky-pull-request-comment@v2
if: github.event_name == 'pull_request'
with:
recreate: true
path: code-coverage-results.md