Skip to content

fix nuget action

fix nuget action #12

Workflow file for this run

# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: .NET
on:
push:
branches: [ "main", "develop"]
pull_request:
branches: [ "main" ]
defaults:
run:
working-directory: ./dotnet
jobs:
build:
runs-on: ubuntu-latest
environment: test
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
env:
SITECORESEND__APIKEY: ${{ secrets.SITECORESEND__APIKEY }}
SITECORESEND__TESTLISTID: ${{ secrets.SITECORESEND__TESTLISTID }}
run: dotnet test --no-build --verbosity normal --logger "trx;LogFileName=test-results.trx"
- name: Test Reporter
if: success() || failure() # run this step even if previous step failed
uses: bibipkins/dotnet-test-reporter@v1.4.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
comment-title: 'Unit Test Results'
results-path: ./**/*.trx
# coverage-path: ./TestResults/coverage.xml
# coverage-threshold: 80