Skip to content

Merge pull request #101 from ZUOXIANGE/dependabot/nuget/testing-505e9… #256

Merge pull request #101 from ZUOXIANGE/dependabot/nuget/testing-505e9…

Merge pull request #101 from ZUOXIANGE/dependabot/nuget/testing-505e9… #256

Workflow file for this run

name: CI
on:
push:
branches: [ main, develop ]
paths-ignore:
- "**.md"
- "docs/**"
- "LICENSE"
pull_request:
branches: [ main, develop ]
paths-ignore:
- "**.md"
- "docs/**"
- "LICENSE"
env:
DOTNET_VERSION: '10.0.x'
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_NOLOGO: true
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Check Formatting
run: dotnet format --verify-no-changes
build:
name: Build (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Restore dependencies
run: dotnet restore L2Cache.slnx
- name: Build
run: dotnet build L2Cache.slnx --configuration Release --no-restore
test:
name: Integration Tests
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Restore dependencies
run: dotnet restore L2Cache.slnx
- name: Build
run: dotnet build L2Cache.slnx --configuration Release --no-restore
- name: Test
run: |
dotnet run --project tests/L2Cache.Tests.Unit --configuration Release --no-build
dotnet run --project tests/L2Cache.Tests.Integration --configuration Release --no-build