Skip to content

chore(deps): update codecov/codecov-action action to v4 #66

chore(deps): update codecov/codecov-action action to v4

chore(deps): update codecov/codecov-action action to v4 #66

name: .NET Test (Multi-OS)
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
# Disable the .NET logo in the console output.
DOTNET_NOLOGO: true
# Disable the .NET first time experience to skip caching NuGet packages and speed up the build.
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
# Disable sending .NET CLI telemetry to Microsoft.
DOTNET_CLI_TELEMETRY_OPTOUT: true
BUILD_ARTIFACT_PATH: ${{github.workspace}}/build-artifacts
jobs:
build:
name: Build ${{matrix.os}}
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [ubuntu-20.04, macOS-latest, windows-2022] # As of 2022-02-04, windows-latest >> windows-2019
steps:
- name: Setup MongoDB
uses: ankane/setup-mongodb@v1
- name: Checkout
uses: actions/checkout@v2
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6.0.x
7.0.x
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --logger trx --results-directory ${{env.BUILD_ARTIFACT_PATH}}/test-results/${{matrix.os}}
- name: Publish artifacts
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
path: ${{env.BUILD_ARTIFACT_PATH}}