Repository navigation
68 lines (65 loc) · 2.16 KB
/
Copy pathmaster.yml
File metadata and controls
68 lines (65 loc) · 2.16 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Master Push Workflow
on:
push:
branches: [master]
permissions:
contents: write
jobs:
build-and-tag:
name: Build & Tag
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v6
with:
dotnet-version: 10.x
- name: Setup GitVersion
uses: gittools/actions/gitversion/setup@v4
with:
versionSpec: '6.8.x'
- name: Determine Version
id: version_step
uses: gittools/actions/gitversion/execute@v4
- name: Push New Version Tag
run: |
$gv = 'v${{ steps.version_step.outputs.majorMinorPatch }}' #gitversion result
$lt = $( git describe --tags --abbrev=0 ) # last tag version result
if ( -Not ( $gv -eq $lt ) )
{
git tag $gv
git push origin --tags
}
- name: Restore dependencies
run: dotnet restore
- name: Build
run: >-
dotnet build -p:Version=${{ steps.version_step.outputs.fullSemVer }}
--no-restore -c Debug -v n
- name: Unit Tests
run: dotnet test -c Debug --no-build -v n --filter-trait Category=Unit
- name: Integration Tests
run: |
dotnet test --project tests/HydraScript.IntegrationTests `
-c Debug --no-build -v n `
--coverage --coverage-output-format cobertura --coverage-output coverage.cobertura.xml `
--coverage-settings tests/coverage-exclude.xml
mkdir coverage-report
- name: ReportGenerator
uses: danielpalme/ReportGenerator-GitHub-Action@5.5.11
with:
reports: './TestResults/coverage.cobertura.xml'
targetdir: './coverage-report'
- name: Upload coverage report artifact
uses: actions/upload-artifact@v7
with:
name: CoverageReport
path: coverage-report
- name: Upload Windows Build
uses: actions/upload-artifact@v7
with:
name: windows_build_${{ steps.version_step.outputs.fullSemVer }}
path: ./src/HydraScript/bin/Debug/net10.0