-
Notifications
You must be signed in to change notification settings - Fork 16
91 lines (65 loc) · 3.53 KB
/
main.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
# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
# https://timheuer.com/blog/building-net-framework-apps-using-github-actions/
jobs:
# This workflow contains a single job called "build"
build:
runs-on: windows-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v1
name: Checkout Code
- name: Check if line endings are CRLF
run: |
bash -c "git grep -rlIP . | xargs unix2dos"
echo test
git diff --exit-code
- name: Add msbuild to PATH
uses: microsoft/[email protected]
- name: Setup NuGet.exe for use with actions
uses: NuGet/[email protected]
- name: Restore Tools
run: dotnet tool restore
- name: Restore NuGet Packages
run: nuget restore Rubjerg.Graphviz.sln
- name: Build App
run: msbuild Rubjerg.Graphviz.sln /p:Configuration=Release
- name: Check if README is up-to-date
run: git diff --exit-code -- README.md
- name: Check if code is formatted
run: dotnet format whitespace --verify-no-changes -v diag Rubjerg.Graphviz.sln
- name: Check if code is formatted
run: dotnet format whitespace --verify-no-changes -v diag Rubjerg.Graphviz.NugetTests.sln
- name: Run Unittests Without Coverage (.NET 8)
run: bash run-tests-netcore.sh Rubjerg.Graphviz.Test\Rubjerg.Graphviz.Test.csproj
- name: Run Unittests With Coverage Calculation (.NET 4.8)
run: packages\opencover\4.7.1221\tools\OpenCover.Console.exe -skipautoprops -returntargetcode -register '-target:bash.exe' -targetargs:'nunit-console.sh Rubjerg.Graphviz.Test\bin\x64\Release\net48\Rubjerg.Graphviz.Test.dll' '-filter:+[Rubjerg*]* -[Rubjerg.Graphviz.Test*]*'
- name: Upload Coverage data
run: |
echo "C:\msys64\usr\bin" >> $GITHUB_PATH
Invoke-WebRequest -Uri 'https://codecov.io/bash' -OutFile codecov.sh
bash codecov.sh -f "results.xml"
- name: Run Transitive Tests (.NET 8)
run: bash run-tests-netcore.sh Rubjerg.Graphviz.TransitiveTest\Rubjerg.Graphviz.TransitiveTest.csproj
- name: Run Transitive Tests (.NET 4.8)
run: bash nunit-console.sh Rubjerg.Graphviz.TransitiveTest\bin\x64\Release\net48\Rubjerg.Graphviz.TransitiveTest.dll
- name: Restore NuGet Packages for Nuget Tests (from local package source)
run: nuget restore Rubjerg.Graphviz.NugetTests.sln
- name: Build Nuget Test Solution
run: msbuild Rubjerg.Graphviz.NugetTests.sln /p:Configuration=Release
- name: Run Nuget Tests (.NET 8)
run: bash run-tests-netcore.sh Rubjerg.Graphviz.NugetTest\Rubjerg.Graphviz.NugetTest.csproj
- name: Run Nuget Tests (.NET 4.8)
run: bash nunit-console.sh Rubjerg.Graphviz.NugetTest\bin\x64\Release\net48\Rubjerg.Graphviz.NugetTest.dll
- name: Run Transitive Nuget Tests (.NET 4.8)
run: bash nunit-console.sh Rubjerg.Graphviz.TransitiveNugetTest\bin\x64\Release\net48\Rubjerg.Graphviz.TransitiveNugetTest.dll
- name: Run Transitive Nuget Tests (.NET 8)
run: bash nunit-console.sh Rubjerg.Graphviz.TransitiveNugetTest\bin\x64\Release\net8.0\Rubjerg.Graphviz.TransitiveNugetTest.dll