Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 21 additions & 51 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,83 +13,53 @@ jobs:

steps:
- name: Checkout (github)
uses: actions/checkout@v6
uses: actions/checkout@v7

- name: Setup .NET ${{ env.DOTNET_VERSION }}
uses: actions/setup-dotnet@v5
uses: actions/setup-dotnet@v6
with:
dotnet-version: ${{ env.DOTNET_VERSION }}

- name: Verify Formatting
run: dotnet format --verify-no-changes --verbosity diagnostic

# --------------------------------------
# Currnly there is bug in dotnet cli for
# nuget that breaks when using
# `Shared Projects`.
# --------------------------------------
# TURNING OFF JOB FOR NOW
#---------------------------------------
# verify-packages:
# name: Verify Safe Packages
# needs: [verify-code]

# timeout-minutes: 5

# runs-on: ubuntu-latest

# steps:
# - name: Checkout (github)
# uses: actions/checkout@v6

# - name: Setup .NET ${{ env.DOTNET_VERSION }}
# uses: actions/setup-dotnet@v5
# with:
# dotnet-version: ${{ env.DOTNET_VERSION }}

# - name: Restore Solution
# run: dotnet restore

# - name: Check Solution Packages
# run: dotnet list package --vulnerable --include-transitive

verify-tests:
name: Verify Tests on ${{ matrix.os }}
needs: [verify-code]

timeout-minutes: 5

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]

runs-on: ${{ matrix.os }}

steps:
- name: Checkout (github)
uses: actions/checkout@v6
uses: actions/checkout@v7

- name: Setup .NET ${{ env.DOTNET_VERSION }}
uses: actions/setup-dotnet@v5
uses: actions/setup-dotnet@v6
with:
dotnet-version: ${{ env.DOTNET_VERSION }}

- name: Test (macos)
if: matrix.os == 'macos-latest'
run: |
brew install rocksdb
dotnet build -p:GITHUB_ACTIONS=true
dotnet test --no-build -p:GITHUB_ACTIONS=true
- name: Build
run: dotnet build -p:GITHUB_ACTIONS=true

- name: Test (windows)
if: matrix.os == 'windows-latest'
run: |
dotnet build -p:GITHUB_ACTIONS=true
dotnet test --no-build -p:GITHUB_ACTIONS=true
- name: Test
run: >
dotnet test --no-build
--logger "junit;LogFilePath=TestResults/{assembly}.xml"
--binaryLogger:${{ matrix.os }}.binlog
-p:GITHUB_ACTIONS=true

- name: Test (linux)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get --assume-yes install librocksdb-dev
dotnet build -p:GITHUB_ACTIONS=true
dotnet test --no-build -p:GITHUB_ACTIONS=true
- name: Publish Test Results
uses: test-summary/action@dist
if: always()
with:
paths: |
tests/**/TestResults/**/*.xml
folded: true
show: "all"
6 changes: 2 additions & 4 deletions tests/Directory.Build.Props → tests/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,15 @@
<PropertyGroup>
<LangVersion>latest</LangVersion>
<IsPackable>false</IsPackable>
<CollectCoverage>true</CollectCoverage>
<CoverletOutput>../../TestResults/$(MSBuildProjectName)/</CoverletOutput>
<CoverletOutputFormat>lcov</CoverletOutputFormat>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
<AnalysisLevel>latest</AnalysisLevel>
<OutputPath>../../bin/tests/$(MSBuildProjectName)</OutputPath>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="10.0.1" />
<!-- Always reference so VSTest can resolve the "junit" logger (not only on CI). -->
<PackageReference Include="JunitXml.TestLogger" Version="8.0.0" />
</ItemGroup>

</Project>