Skip to content

Commit

Permalink
ci adjustments (#100)
Browse files Browse the repository at this point in the history
* remove old build scripts

* more ci script migrated to action

* fix escaping in yml file

* reduce fetch depth

* unit test line fixed

* unit test timeout and code cov

* tweak unit test output path

* fixed unit test not firing

* add resharper dupfinder

* add net core 3.1 for resharper tools
  • Loading branch information
dpvreony authored Jan 24, 2021
1 parent ddffdc9 commit 2abb17a
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 765 deletions.
81 changes: 70 additions & 11 deletions .github/workflows/dotnet-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,31 +13,85 @@ jobs:
outputs:
nbgv: ${{ steps.nbgv.outputs.SemVer2 }}
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_NOLOGO: true
DOTNET_GENERATE_ASPNET_CERTIFICATE: false
solutionpath: src\Dhgms.Nucleotide.sln
unittestprojectpath: src\Dhgms.Nucleotide\Dhgms.Nucleotide.csproj
unittestprojectpath: src\Dhgms.Nucleotide.UnitTests\Dhgms.Nucleotide.UnitTests.csproj
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup .NET Core
with:
fetch-depth: 0

- name: Setup .NET Core 3.1
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.100
dotnet-version: 3.1.x

# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@c26a08ba26249b81327e26f6ef381897b6a8754d
- name: Setup .NET 5
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x

- name: NBGV
id: nbgv
uses: dotnet/nbgv@master
with:
setAllVars: true

- name: Build
run: .\build.ps1
shell: powershell

- name: Install dotnet tools
run: |
dotnet tool install --global dotMorten.OmdGenerator
dotnet tool install --global ConfigValidate
dotnet tool install --global dotnet-outdated-tool
dotnet tool install --global snitch
dotnet tool install --global dotnet-sonarscanner
dotnet tool install --global JetBrains.ReSharper.GlobalTools
- name: Prepare Artifact Directory
run: |
mkdir artifacts
mkdir artifacts\nupkg
mkdir artifacts\outdated
mkdir artifacts\snitch
mkdir artifacts\omd
mkdir artifacts\docfx
- name: Restore Packages
run: |
dotnet restore ${{ env.solutionpath }} /bl:artifacts\\binlog\\restore.binlog
- name: Run Build
run: |
dotnet build ${{ env.solutionpath }} --configuration Release --no-restore /bl:artifacts\\binlog\\build.binlog
- name: Run Unit Tests
run: |
dotnet test ${{ env.unittestprojectpath }} --configuration Release --no-build /bl:artifacts\\binlog\\unittest.binlog --nologo --blame-hang-timeout 60000 --results-directory artifacts\opencover --collect:"XPlat Code Coverage" -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover
- name: Upload Code Coverage
shell: bash
run: |
echo $PWD
bash <(curl -s https://codecov.io/bash) -X gcov -X coveragepy -t ${{ env.CODECOV_TOKEN }} -s '$PWD/artifacts/opencover' -f '*.xml'
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

- name: Produce Nuget Packages
run: |
dotnet pack ${{ env.solutionpath }} --configuration Release --no-build /bl:artifacts\\binlog\\pack.binlog --nologo /p:PackageOutputPath=..\..\artifacts\nuget
- name: List outdated packages
run: |
dotnet outdated -o artifacts\outdated\outdated.json src
- name: Run Resharper Duplicate Code Finder
run: |
jb dupfinder ${{ env.solutionpath }} -o=artifacts\dupfinder\report.xml
# only store binlog on failure
- name: store binlogs
if: ${{ failure() }}
Expand Down Expand Up @@ -76,6 +130,11 @@ jobs:
name: snitch
path: artifacts/snitch

- name: store resharper dupfinder
uses: actions/upload-artifact@v2
with:
name: dupfinder
path: artifacts/dupfinder
release:
runs-on: ubuntu-latest
needs: build
Expand Down
55 changes: 0 additions & 55 deletions appveyor.yml

This file was deleted.

Loading

0 comments on commit 2abb17a

Please sign in to comment.