tests #7325
This file contains hidden or 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: [ 'latest', '25.1' ] | |
| 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" | |
| efcore-functional-tests: | |
| runs-on: ubuntu-22.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| ydb-version: [ 'latest', '25.1' ] | |
| 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: 9.0.x | |
| - name: Run EFCore tests | |
| run: dotnet test src/EFCore.Ydb/test/EntityFrameworkCore.Ydb.FunctionalTests/EntityFrameworkCore.Ydb.FunctionalTests.csproj -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 Ydb.Sdk.AdoNet.QuickStart | |
| run: | | |
| docker cp ydb-local:/ydb_certs/ca.pem ~/ | |
| cd ./examples/Ydb.Sdk.AdoNet.QuickStart | |
| dotnet run | |
| - name: Run Ydb.Sdk.AdoNet.Dapper.QuickStart | |
| run: | | |
| cd ./examples/Ydb.Sdk.AdoNet.Dapper.QuickStart | |
| dotnet run | |
| - name: Run Ydb.Sdk.Topic.QuickStart | |
| run: | | |
| cd ./examples/Ydb.Sdk.Topic.QuickStart | |
| dotnet run | |
| - name: Run EntityFrameworkCore.Ydb.QuickStart | |
| run: | | |
| cd ./examples/EntityFrameworkCore.Ydb.QuickStart | |
| dotnet tool install --global dotnet-ef | |
| dotnet add package Microsoft.EntityFrameworkCore.Design | |
| dotnet ef migrations add InitialCreate | |
| dotnet ef database update | |
| dotnet run | |
| - name: Run EntityFrameworkCore.Ydb.Samples/Database.Operations.Tutorial | |
| run: | | |
| cd ./examples/EntityFrameworkCore.Ydb.Samples/Database.Operations.Tutorial | |
| dotnet tool install --global dotnet-ef | |
| dotnet add package Microsoft.EntityFrameworkCore.Design | |
| dotnet ef migrations add InitialCreate | |
| dotnet ef database update | |
| dotnet run |