tests #5487
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: tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
workflow_dispatch: | |
# For detect flaky tests | |
schedule: | |
- cron: "45 * * * *" | |
jobs: | |
unit-tests: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ ubuntu-22.04, windows-2022, macos-15 ] | |
dotnet-version: [ 6.0.x, 7.0.x ] | |
include: | |
- dotnet-version: 6.0.x | |
dotnet-target-framework: net6.0 | |
- dotnet-version: 7.0.x | |
dotnet-target-framework: net7.0 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup dotnet | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: ${{ matrix.dotnet-version }} | |
- name: Test | |
run: dotnet test src/Ydb.Sdk/tests/Tests.csproj --filter "Category=Unit" -f ${{ matrix.dotnet-target-framework }} | |
ado-net-tests: | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
ydb-version: [ 'trunk', 'latest' ] | |
dotnet-version: [ 6.0.x, 7.0.x ] | |
include: | |
- dotnet-version: 6.0.x | |
dotnet-target-framework: net6.0 | |
- dotnet-version: 7.0.x | |
dotnet-target-framework: net7.0 | |
services: | |
ydb: | |
image: ydbplatform/local-ydb:${{ matrix.ydb-version }} | |
ports: | |
- 2135:2135 | |
- 2136:2136 | |
- 8765:8765 | |
env: | |
YDB_LOCAL_SURVIVE_RESTART: true | |
options: '--name ydb-local -h localhost' | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install Dotnet | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: ${{ matrix.dotnet-version }} | |
- name: Run ADO.NET tests | |
run: | | |
docker cp ydb-local:/ydb_certs/ca.pem ~/ | |
dotnet test src/Ydb.Sdk/tests/Tests.csproj --filter "(FullyQualifiedName~Ado) | (FullyQualifiedName~Dapper)" -f ${{ matrix.dotnet-target-framework }} -l "console;verbosity=normal" | |
topic-tests: | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
ydb-version: [ 'trunk' ] | |
dotnet-version: [ 6.0.x, 7.0.x ] | |
include: | |
- dotnet-version: 6.0.x | |
dotnet-target-framework: net6.0 | |
- dotnet-version: 7.0.x | |
dotnet-target-framework: net7.0 | |
services: | |
ydb: | |
image: ydbplatform/local-ydb:${{ matrix.ydb-version }} | |
ports: | |
- 2135:2135 | |
- 2136:2136 | |
- 8765:8765 | |
env: | |
YDB_LOCAL_SURVIVE_RESTART: true | |
options: '--name ydb-local -h localhost' | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install Dotnet | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: ${{ matrix.dotnet-version }} | |
- name: Run Topic tests | |
run: dotnet test src/Ydb.Sdk/tests/Tests.csproj --filter "FullyQualifiedName~Topic" -f ${{ matrix.dotnet-target-framework }} -l "console;verbosity=detailed" | |
integration-tests: | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
ydb-version: [ 'trunk' ] | |
dotnet-version: [ 6.0.x, 7.0.x ] | |
include: | |
- dotnet-version: 6.0.x | |
dotnet-target-framework: net6.0 | |
- dotnet-version: 7.0.x | |
dotnet-target-framework: net7.0 | |
services: | |
ydb: | |
image: ydbplatform/local-ydb:${{ matrix.ydb-version }} | |
ports: | |
- 2135:2135 | |
- 2136:2136 | |
- 8765:8765 | |
env: | |
YDB_LOCAL_SURVIVE_RESTART: true | |
options: '--name ydb-local -h localhost' | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install Dotnet | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: ${{ matrix.dotnet-version }} | |
- name: Integration test | |
run: dotnet test src/Ydb.Sdk/tests/Tests.csproj --filter "Category=Integration" -f ${{ matrix.dotnet-target-framework }} -l "console;verbosity=normal" | |
run-examples: | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
ydb-version: [ 'latest', 'trunk' ] | |
dotnet-version: [ 6.0.x, 7.0.x ] | |
include: | |
- dotnet-version: 6.0.x | |
dotnet-target-framework: net6.0 | |
- dotnet-version: 7.0.x | |
dotnet-target-framework: net7.0 | |
services: | |
ydb: | |
image: ydbplatform/local-ydb:${{ matrix.ydb-version }} | |
ports: | |
- 2135:2135 | |
- 2136:2136 | |
- 8765:8765 | |
env: | |
YDB_LOCAL_SURVIVE_RESTART: true | |
YDB_USE_IN_MEMORY_PDISKS: true | |
options: '--name ydb-local -h localhost' | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install Dotnet | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: ${{ matrix.dotnet-version }} | |
- name: Run ADO.NET example | |
run: | | |
docker cp ydb-local:/ydb_certs/ca.pem ~/ | |
cd ./examples/src/AdoNet | |
dotnet run | |
- name: Run Dapper example | |
run: | | |
cd ./examples/src/DapperExample | |
dotnet run | |
- name: Run YDB Topic example | |
run: | | |
cd ./examples/src/Topic | |
dotnet run | |
- name: Run EF example | |
run: | | |
cd ./examples/src/EF | |
dotnet run |