Skip to content

ci(gh-actions): prevent upload extra files on codecov-action #359

ci(gh-actions): prevent upload extra files on codecov-action

ci(gh-actions): prevent upload extra files on codecov-action #359

Workflow file for this run

name: .NET CI
on:
push:
branches:
- main
paths-ignore:
- "**.md"
pull_request:
paths-ignore:
- "**.md"
env:
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_NOLOGO: true
NUGET_XMLDOC_MODE: skip
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
jobs:
lint:
name: Lint
uses: nogic1008/actions/.github/workflows/dotnet-format.yml@v1.1.0
lock-file:
name: Validate NuGet Lock Files
uses: nogic1008/actions/.github/workflows/nuget-lock-files.yml@v1.1.0
with:
update-lock-files: ${{ contains(github.head_ref, 'dependabot') && github.event_name == 'pull_request' }}
dotnet-version: ${{ vars.DOTNET_SDK_VERSIONS }}
lock-file-path: "**/packages.lock.json"
secrets:
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
framework: [net6.0, net8.0]
include:
- os: windows-latest
framework: net48
name: Debug Build & Test
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4.1.2
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4.0.0
with:
dotnet-version: ${{ vars.DOTNET_SDK_VERSIONS }}
cache: true
cache-dependency-path: "**/packages.lock.json"
- name: Restore
run: dotnet restore
- name: Debug Build
run: dotnet build --no-restore
- name: Test
run: dotnet test -f ${{ matrix.framework }} --no-build -p:TestingPlatformCommandLineArguments="--coverage --coverage-output-format cobertura"
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4.3.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: ${{ runner.os }},${{ matrix.framework }}
exclude: ./.nuget/**