-
-
Notifications
You must be signed in to change notification settings - Fork 1
38 lines (38 loc) · 1.34 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
name: "Build MCART"
on:
push:
paths-ignore:
- '**/*.md'
- '**/*.gitignore'
- '**/*.gitattributes'
branches-ignore:
- 'docs*'
tags-ignore:
- '*'
jobs:
build:
runs-on: windows-latest
env:
Solution_Name: src/MCART.sln
Configuration: Debug
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Install Codecov
run: choco install codecov -y
- name: Build and test MCART
run: dotnet test $env:Solution_Name --configuration=$env:Configuration --collect:"XPlat Code Coverage" --results-directory .\Build\tests -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover
- name: Upload code coverage report
run: foreach ($j in (ls .\Build\tests\ -Directory)) { codecov -f "$($j.FullName)\coverage.opencover.xml" }
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Create NuGet Packages
run: dotnet pack $env:Solution_Name --configuration=$env:Configuration --version-suffix=$env:GITHUB_SHA --include-source -p:RepositoryBranch=${{ github.ref }} -p:ContinuousIntegrationBuild=true
- uses: actions/upload-artifact@v2
with:
name: MCART-nuget-packages
path: Build/Bin/**/*.nupkg