Bump xunit.runner.visualstudio from 3.0.0 to 3.0.1 #190
Workflow file for this run
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: .NET Core | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
env: | |
package_feed: "https://nuget.pkg.github.com/ken-tucker/index.json" | |
nuget_folder: "\\packages" | |
nuget_upload: 'packages/*.nupkg' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
actions: read | |
contents: read | |
security-events: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # avoid shallow clone so nbgv can do its work | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 9.0.x | |
- name: Install dependencies | |
run: dotnet restore | |
- name: Install Microsoft SBom tool | |
run: dotnet tool install --global Microsoft.Sbom.DotNetTool | |
- name: Install NBGV tool | |
run: dotnet tool install -g nbgv | |
- name: Set Version | |
run: nbgv cloud | |
- name: Build | |
run: dotnet build --configuration Release --no-restore | |
- name: Test | |
run: dotnet test OpenWeatherMap.Standard.sln --configuration Release -p:CollectCoverage=true -p:CoverletOutput=TestResults/ -p:CoverletOutputFormat=opencover --no-build --verbosity normal | |
- name: Create Test Coverage Badge | |
uses: simon-k/[email protected] | |
id: create_coverage_badge | |
with: | |
label: Unit Test Coverage | |
color: brightgreen | |
path: OpenWeatherMap.Standard.Core.Test/TestResults/coverage.opencover.xml | |
gist-filename: code-coverage.json | |
gist-id: 05708cb0180d790434ef8a4b5499beb7 | |
gist-auth-token: ${{ secrets.GIST_AUTH_TOKEN }} | |
- name: Print code coverage | |
run: echo "Code coverage percentage ${{steps.create_coverage_badge.outputs.percentage}}%" | |
- name: Print badge data | |
run: echo "Badge data ${{steps.create_coverage_badge.outputs.badge}}" | |
- name: Pack Nuget | |
run: dotnet pack OpenWeatherMap.Standard/OpenWeatherMap.Standard.csproj --output ${{env.nuget_folder}} --configuration release | |
- name: publish Nuget Packages to GitHub | |
run: dotnet nuget push ${{env.nuget_upload}} --source ${{vars.NUGET_FEED}} --api-key ${{secrets.NUGET_PACKAGE_UPLOAD}} --skip-duplicate | |
if: github.event_name != 'pull_request' | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: published_nuget | |
path: ${{env.nuget_folder}} | |