-
Notifications
You must be signed in to change notification settings - Fork 7
47 lines (44 loc) · 1.52 KB
/
Copy pathbuild.yml
File metadata and controls
47 lines (44 loc) · 1.52 KB
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
name: Full Build
on:
workflow_dispatch:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: 10.x
- name: Build
run: dotnet build --configuration Release
- name: Test
run: dotnet test --configuration Release --no-build --no-restore --collect:"XPlat Code Coverage;Format=opencover"
- name: ReportGenerator
uses: danielpalme/ReportGenerator-GitHub-Action@5.3.9
with:
reports: tests/**/coverage.opencover.xml
targetdir: ${{ runner.temp }}/coveragereport
reporttypes: 'Html;Badges;MarkdownSummaryGithub'
assemblyfilters: -*Tests*
- name: Publish coverage report in build summary
run: cat '${{ runner.temp }}'/coveragereport/SummaryGithub.md >> $GITHUB_STEP_SUMMARY
shell: bash
- name: Create coverage-reports branch and push content
run: |
git fetch
git checkout coverage-reports || git checkout --orphan coverage-reports
git reset --hard
git clean -fd
cp -rp '${{ runner.temp }}'/coveragereport/* ./
echo "queryspecification.fiseni.com" > CNAME
git config user.name github-actions
git config user.email github-actions@github.com
git add .
git commit -m "Update coverage reports [skip ci]" || echo "No changes to commit"
git push origin coverage-reports --force
shell: bash