-
Notifications
You must be signed in to change notification settings - Fork 1
86 lines (66 loc) · 2.67 KB
/
build.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
name: App Portal Build
on:
push:
branches-ignore:
- 'release/**'
env:
buildConfiguration: Release
permissions:
pull-requests: write # required by sticky-pull-request-comment@v2
jobs:
build:
runs-on: ubuntu-latest
name: CI Build
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.x.x
- name: Setup dependency caching for faster builds
uses: actions/cache@v3
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Restore .NET tools
run: dotnet tool restore
- name: Restore dependencies
run: dotnet cake --task=restore
- name: Build solution - ${{ env.buildConfiguration }}
run: dotnet cake --task=build --configuration=${{ env.buildConfiguration }} --exclusive
- name: Run unit tests - ${{ env.buildConfiguration }}
run: dotnet cake --task=unit-tests --configuration=${{ env.buildConfiguration }} --exclusive
- name: Run integration tests - ${{ env.buildConfiguration }}
run: dotnet cake --task=integration-tests --configuration=${{ env.buildConfiguration }} --exclusive
- name: Run acceptance tests - ${{ env.buildConfiguration }}
run: dotnet cake --task=acceptance-tests --configuration=${{ env.buildConfiguration }} --exclusive
- name: Generate test reports
run: dotnet cake --task=test-reports --exclusive
- name: Upload test reports
run: dotnet cake --task=upload-test-reports --exclusive
- name: Generate code coverage reports
run: dotnet cake --task=code-coverage-reports --exclusive
- name: Upload code coverage reports
run: dotnet cake --task=upload-code-coverage-reports --exclusive
- name: Find the PR associated with this push
uses: jwalton/gh-find-current-pr@v1
id: findPr
- name: Add test reports PR Comment on Github
uses: marocchino/sticky-pull-request-comment@v2
with:
header: testReports
recreate: true
hide_classify: "OUTDATED"
number: ${{ steps.findPr.outputs.pr }}
path: ./artifacts/tests/dbml.NET.test_report.md
- name: Add code coverage reports PR Comment on Github
uses: marocchino/sticky-pull-request-comment@v2
with:
header: codeCoverageReports
recreate: true
hide_classify: "OUTDATED"
number: ${{ steps.findPr.outputs.pr }}
path: ./artifacts/coverage/SummaryGithub.md