Skip to content

Bump NSubstitute from 5.0.0 to 5.1.0 (#370) #452

Bump NSubstitute from 5.0.0 to 5.1.0 (#370)

Bump NSubstitute from 5.0.0 to 5.1.0 (#370) #452

Workflow file for this run

name: Tests
on:
push:
branches: [ main ]
paths-ignore:
- '**/*.md'
pull_request:
branches: [ main ]
jobs:
coverage:
name: Coverage
runs-on: ubuntu-latest
services:
clickhouse:
image: clickhouse/clickhouse-server:latest
ports:
- 8123:8123
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/cache@v3
name: Cache NuGet
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Checkout main
uses: actions/checkout@v4
if: ${{ github.event_name == 'pull_request' }}
with:
ref: main
path: main
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6.x
- name: Install pycobertura
run: pip install pycobertura
- name: Install coverlet-collector
run: dotnet add ClickHouse.Client.Tests/ClickHouse.Client.Tests.csproj package coverlet.collector --no-restore
- name: Install coverlet-msbuild
run: dotnet add ClickHouse.Client.Tests/ClickHouse.Client.Tests.csproj package coverlet.msbuild --no-restore
- name: Install GitHubActionsTestLogger
run: dotnet add ClickHouse.Client.Tests/ClickHouse.Client.Tests.csproj package GitHubActionsTestLogger --no-restore
- name: Test with coverage
run: dotnet test --framework net6.0 --configuration Release --verbosity normal --logger GitHubActions /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura /p:SkipAutoProps=true
env:
CLICKHOUSE_CONNECTION: Host=localhost;Port=8123
- run: mv ./ClickHouse.Client.Tests/coverage.net6.0.cobertura.xml ./coverage.cobertura.xml
- name: Upload coverage xml
if: always()
uses: actions/upload-artifact@v3
with:
name: coverage
path: ./coverage.cobertura.xml
- name: Download 'main' coverage
if: ${{ github.event_name == 'pull_request' }}
uses: benday-inc/download-latest-artifact@main
with:
token: ${{ github.token }}
repository_owner: ${{ github.repository_owner }}
repository_name: ClickHouse.Client
workflow_name: ${{ github.workflow }}
branch_name: main
artifact_name: coverage
download_path: ${{ github.workspace }}/main/ClickHouse.Client
download_filename: coverage.zip
- name: Unzip 'main' coverage
if: ${{ github.event_name == 'pull_request' }}
working-directory: ${{ github.workspace }}/main/ClickHouse.Client
run: unzip coverage.zip
- name: Report diff coverage
if: ${{ github.event_name == 'pull_request' }}
run: pycobertura diff ./main/coverage.cobertura.xml ./coverage.cobertura.xml --format markdown -o code-coverage-diff.md
continue-on-error: true
- name: Post diff Summary
if: ${{ github.event_name == 'pull_request' }}
run: cat code-coverage-diff.md >> $GITHUB_STEP_SUMMARY
continue-on-error: true
- name: Report full coverage
run: pycobertura show ./coverage.cobertura.xml --format markdown -o code-coverage-full.md
- name: Post full summary
run: cat code-coverage-full.md >> $GITHUB_STEP_SUMMARY
- name: Stick PR comment
if: ${{ github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' }}
uses: marocchino/sticky-pull-request-comment@v2
continue-on-error: true
with:
recreate: true
path: code-coverage-diff.md
windows:
name: Windows Build
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/cache@v3
name: Cache NuGet
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Build
run: dotnet build
benchmark:
name: Benchmark
runs-on: ubuntu-latest
services:
clickhouse:
image: clickhouse/clickhouse-server:latest
ports:
- 8123:8123
steps:
- uses: actions/checkout@v4
name: Checkout
- uses: actions/cache@v3
name: Cache NuGet
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6.x
7.x
- name: Run
run: dotnet run --project ClickHouse.Client.Benchmark/ClickHouse.Client.Benchmark.csproj --framework net6.0 --configuration Release -- --join --filter "*" --artifacts . --job Short
env:
CLICKHOUSE_CONNECTION: Host=localhost;Port=8123
- name: Post results to summary
run: cat results/*-report-github.md >> $GITHUB_STEP_SUMMARY
regress-dotnet:
name: Regression
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
framework: ['net6.0', 'net5.0', 'netcoreapp3.1']
services:
clickhouse:
image: clickhouse/clickhouse-server:latest
ports:
- 8123:8123
steps:
- uses: actions/checkout@v4
name: Checkout
- uses: actions/cache@v3
name: Cache NuGet
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
3.1.x
5.x
6.x
- name: Install GitHubActionsTestLogger
run: dotnet add ClickHouse.Client.Tests/ClickHouse.Client.Tests.csproj package GitHubActionsTestLogger --no-restore
- name: Test
run: dotnet test --framework ${{ matrix.framework }} --configuration Release --verbosity normal --logger GitHubActions /clp:ErrorsOnly
env:
CLICKHOUSE_CONNECTION: Host=localhost;Port=8123
regress:
name: Regression
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
tag:
- 'yandex/clickhouse-server:20.6'
- 'yandex/clickhouse-server:20.9'
- 'yandex/clickhouse-server:20.12'
- 'clickhouse/clickhouse-server:21.3'
- 'clickhouse/clickhouse-server:21.7'
- 'clickhouse/clickhouse-server:21.9'
- 'clickhouse/clickhouse-server:21.12'
- 'clickhouse/clickhouse-server:22.3'
- 'clickhouse/clickhouse-server:22.6'
- 'clickhouse/clickhouse-server:22.9'
- 'clickhouse/clickhouse-server:22.12'
- 'clickhouse/clickhouse-server:23.3'
- 'clickhouse/clickhouse-server:23.6'
services:
clickhouse:
image: ${{ matrix.tag }}
ports:
- 8123:8123
steps:
- uses: actions/checkout@v4
name: Checkout
- uses: actions/cache@v3
name: Cache NuGet
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6.x
- name: Install GitHubActionsTestLogger
run: dotnet add ClickHouse.Client.Tests/ClickHouse.Client.Tests.csproj package GitHubActionsTestLogger --no-restore
- name: Test
run: dotnet test --framework net6.0 --configuration Release --verbosity normal --logger GitHubActions
env:
CLICKHOUSE_CONNECTION: Host=localhost;Port=8123
CLICKHOUSE_CONTAINER_VERSION: ${{ matrix.tag }}