-
Notifications
You must be signed in to change notification settings - Fork 6
36 lines (34 loc) · 1.32 KB
/
build.yml
File metadata and controls
36 lines (34 loc) · 1.32 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
name: continuous integration
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.x'
- name: Install dependencies
run: dotnet restore
- name: Build Decor
run: dotnet build ./Decor/Decor.csproj --configuration Release --no-restore
- name: Build Decor.Extensions.Microsoft.DependencyInjection
run: dotnet build ./Decor.Extensions.Microsoft.DependencyInjection/Decor.Extensions.Microsoft.DependencyInjection.csproj --configuration Release --no-restore
- name: Test and generate coverage report
run: |
cd ./Decor.UnitTests/
dotnet build --framework netcoreapp30
dotnet test --no-build --framework netcoreapp30 /p:CollectCoverage=true /p:CoverletOutput=TestResults/ /p:CoverletOutputFormat=opencover
cd ./TestResults/
mv ./coverage.netcoreapp30.opencover.xml ./opencover.xml
- name: Publish coverage report to Codacity
uses: codacy/codacy-coverage-reporter-action@master
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}