Skip to content

deps: bump codecov/codecov-action (#19) #126

deps: bump codecov/codecov-action (#19)

deps: bump codecov/codecov-action (#19) #126

Workflow file for this run

name: .NET Build & Test
on:
pull_request:
types: [opened, synchronize, reopened]
push:
branches:
- master
- develop
- release/*
- feature/*
- hotfix/*
schedule:
- cron: '0 3 * * *'
workflow_dispatch:
env:
configuration: 'Debug'
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
solution: 'Valuify.sln'
permissions:
contents: read
pull-requests: write
jobs:
build:
name: Build & Test
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4.2.2
with:
fetch-depth: 0
- name: Use .NET SDKs
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
9.0.x
- name: Cache NuGet Packages
uses: actions/cache@v4.2.0
with:
path: ${{ github.workspace }}/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Restore NuGet Packages for Solution
run: dotnet restore ${{ env.solution }}
- name: Build Solution
shell: bash
run: |
if [ "$GITHUB_EVENT_NAME" = "pull_request" ] || [ "$GITHUB_EVENT_NAME" = "schedule" ]; then
dotnet build ${{ env.solution }} --configuration ${{ env.configuration }} -p:DefineConstants="CI" --no-restore
else
dotnet build ${{ env.solution }} --configuration ${{ env.configuration }} --no-restore
fi
- name: Test Solution
run: dotnet test ${{ env.solution }} --configuration ${{ env.configuration }} --no-build
- name: Upload Code Coverage
uses: codecov/codecov-action@13ce06bfc6bbe3ecf90edbbf1bc32fe5978ca1d3
with:
token: ${{ secrets.CODECOV_TOKEN }}