Skip to content

chore: initial setup #2

chore: initial setup

chore: initial setup #2

Workflow file for this run

name: build-and-test
on:
pull_request:
push:
branches:
- main
- releases/*
paths:
- "src/**"
permissions:
contents: read
jobs:
build-and-test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
permissions:
checks: write
steps:
- name: Harden Runner
uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Install .NET Core
uses: actions/setup-dotnet@6bd8b7f7774af54e05809fcc5431931b3eb1ddee # v4.0.1
with:
dotnet-version: 8.0
- name: Restore packages
run: dotnet restore
- name: Build
run: dotnet build --no-restore --configuration Release
- name: Run unit tests
run: >
dotnet test
--no-restore
--configuration Release
--logger "GitHubActions;summary.includePassedTests=true;summary.includeSkippedTests=true;annotations.titleFormat=@test;annotations.messageFormat=@error\n@trace"
/p:CollectCoverage=true
--
RunConfiguration.CollectSourceInformation=true
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./reports/coverage/
fail_ci_if_error: false
flags: unittests
slug: saan800/saansoft-correlationId