dev: refactoring slo #544
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: tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
unit-tests: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-22.04, windows-2022, macos-12] | |
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: | | |
cd src | |
dotnet test --filter "Category=Unit" -f ${{ matrix.dotnet-target-framework }} | |
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: cr.yandex/yc/yandex-docker-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' | |
env: | |
OS: ubuntu-22.04 | |
YDB_VERSION: ${{ matrix.ydb-version }} | |
YDB_CONNECTION_STRING: grpc://localhost:2136/local | |
YDB_CONNECTION_STRING_SECURE: grpcs://localhost:2135/local | |
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: | | |
docker cp ydb-local:/ydb_certs/ca.pem ~/ | |
cd src | |
dotnet test --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: [ 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: cr.yandex/yc/yandex-docker-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 examples | |
run: | | |
docker cp ydb-local:/ydb_certs/ca.pem ~/ | |
cd ./examples/src/AdoNet | |
dotnet run |