update nuget packages & target versions to net 8.0 #126
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: .NET Core Build | |
on: | |
push: | |
branches: [ master ] | |
paths-ignore: | |
- 'Examples/**' | |
- 'README**' | |
pull_request: | |
branches: [ master ] | |
types: [ opened, synchronize ] | |
paths-ignore: | |
- 'Examples/**' | |
- 'README**' | |
env: | |
DOTNET_CLI_TELEMETRY_OPTOUT: true | |
DOTNET_NOLOGO: true | |
NUGET_XMLDOC_MODE: skip | |
NUGET_PACKAGE_PATH: ${{ github.workspace }}/.nuget/packages | |
jobs: | |
lint: | |
name: Lint Code | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 1 | |
- name: Setup .NET Core SDK | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 3.1 | |
- name: Restore Tools | |
run: | | |
dotnet tool restore | |
dotnet tool install -g dotnet-format | |
- name: Add Problem Matcher for dotnet-format | |
uses: xt0rted/dotnet-format-problem-matcher@v1 | |
- name: Lint | |
run: dotnet format --check | |
build: | |
name: Test .NET Side by Side | |
runs-on: windows-latest | |
env: | |
config: 'Release' | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 1 | |
# Setup package cache | |
- uses: actions/cache@v2 | |
with: | |
path: ${{ env.NUGET_PACKAGE_PATH }} | |
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-nuget- | |
# Setup .NET frameworks | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: '8.0' | |
- name: Setup NuGet | |
uses: nuget/setup-nuget@v1 | |
# Install dependencies | |
- name: NuGet Restore | |
run: nuget restore ZotapaySDK.sln | |
# Build project | |
- name: Build | |
run: dotnet build --configuration ${{env.config}} --no-restore | |
# run tests with built project | |
- name: Test | |
run: | | |
dotnet test --framework net8.0 --no-restore --no-build --configuration ${{env.config}} --settings coverlet.runsettings | |
- name: Upload coverage | |
uses: codecov/codecov-action@v1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: "!**/.nuget/packages/**/*.*" |