Permalink
Cannot retrieve contributors at this time
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
43 lines (39 sloc)
1.12 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Code Coverage Badges | |
on: | |
push: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 3.1.101 | |
- name: Install dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --configuration Debug --no-restore | |
- name: Code coverage | |
shell: cmd | |
run: RunCodeCoverage.bat silent none | |
- name: Generate Shields JSON | |
shell: cmd | |
working-directory: .\ShieldGenerator\bin\Debug\netcoreapp3.1 | |
run: ShieldGenerator.exe coverage | |
- name: Copy JSON | |
shell: cmd | |
run: copy .\TestCoverageResults\*.json .\shields | |
- name: Add shields branch | |
run: | | |
git config --local user.name "CodeCoverageBadges-Action" | |
git config --local user.email "action@github.com" | |
git add .\shields\*.json | |
git commit -m "update shields" | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: shields | |
force: true |