forked from rvtr-campsite-lodging/rvtr-api-lodging
-
Notifications
You must be signed in to change notification settings - Fork 0
110 lines (104 loc) · 3.17 KB
/
manual.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
env:
CACHE_KEY_PREFIX: aspnet-lodging
WORKING_DIRECTORY: aspnet
jobs:
restore:
name: restore_aspnet
runs-on: ubuntu-18.04
steps:
- name: actions_checkout
uses: actions/[email protected]
- name: dotnet_cache
uses: actions/[email protected]
with:
path: ~/.nuget/packages
key: ${{ env.CACHE_KEY_PREFIX }}-${{ hashFiles('**/packages.lock.json') }}
- name: dotnet_restore
run: dotnet restore
working-directory: ${{ env.WORKING_DIRECTORY }}
build:
name: build_aspnet
needs: restore
runs-on: ubuntu-18.04
steps:
- name: actions_checkout
uses: actions/[email protected]
- name: dotnet_cache
uses: actions/[email protected]
with:
path: ~/.nuget/packages
key: ${{ env.CACHE_KEY_PREFIX }}-${{ hashFiles('**/packages.lock.json') }}
- name: dotnet_build
run: dotnet build
working-directory: ${{ env.WORKING_DIRECTORY }}
test:
name: test_aspnet
needs: restore
runs-on: ubuntu-18.04
steps:
- name: actions_checkout
uses: actions/[email protected]
- name: dotnet_cache
uses: actions/[email protected]
with:
path: ~/.nuget/packages
key: ${{ env.CACHE_KEY_PREFIX }}-${{ hashFiles('**/packages.lock.json') }}
- name: dotnet_test
run: |
dotnet test \
-p:CollectCoverage=true \
-p:CoverletOutput=../code_coverage/ \
-p:CoverletOutputFormat=opencover \
--logger trx \
--results-directory ./test_coverage/
working-directory: ${{ env.WORKING_DIRECTORY }}
- name: opencover_upload
uses: actions/[email protected]
with:
name: code_coverage
path: ${{ env.WORKING_DIRECTORY }}/code_coverage
- name: trx_upload
uses: actions/[email protected]
with:
name: test_coverage
path: ${{ env.WORKING_DIRECTORY }}/test_coverage
analyze:
name: analyze_aspnet
needs: [build, test]
runs-on: ubuntu-18.04
steps:
- name: actions_checkout
uses: actions/[email protected]
- name: git_fetch
run: git fetch --unshallow
- name: opencover_download
uses: actions/[email protected]
with:
name: code_coverage
path: ${{ env.WORKING_DIRECTORY }}/code_coverage
- name: trx_download
uses: actions/[email protected]
with:
name: test_coverage
path: ${{ env.WORKING_DIRECTORY }}/test_coverage
- name: sonar_install
run: dotnet tool install --global dotnet-sonarscanner
- name: dotnet_cache
uses: actions/[email protected]
with:
path: ~/.nuget/packages
key: ${{ env.CACHE_KEY_PREFIX }}-${{ hashFiles('**/packages.lock.json') }}
- name: sonar_scan
run: |
dotnet sonarscanner begin -k:rvtr_api_lodging -o:rvtr -s:$(pwd)/sonar.analysis.xml
dotnet build
dotnet sonarscanner end
working-directory: ${{ env.WORKING_DIRECTORY }}
name: build
on:
pull_request:
branches:
- master
push:
branches:
- IntegrationTests