Skip to content

testing: results summary #8825

testing: results summary

testing: results summary #8825

Workflow file for this run

name: tests
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
# For detect flaky tests
schedule:
- cron: "45 * * * *"
jobs:
ydb-sdk-tests:
strategy:
matrix:
ydb-version: [ 'latest', '25.1' ]
dotnet-version: [ 8.0.x, 9.0.x ]
runs-on: ubuntu-22.04
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: Init test summary table
run: |
echo '| Test Suite | ✓ Passed | ✗ Failed | ↻ Skipped | ∑ Total | ⏱ Elapsed |' > summary-table.md
echo '|:---------- | -------: | -------: | --------: | ------: | --------: |' >> summary-table.md
- name: Run ADO.NET Tests
working-directory: ./src/Ydb.Sdk/test/Ydb.Sdk.Ado.Tests
run: |
docker cp ydb-local:/ydb_certs/ca.pem ~/
dotnet test --logger "trx;LogFileName=ado.trx"
- name: Parse ADO.NET test results
working-directory: ./src/Ydb.Sdk/test/Ydb.Sdk.Ado.Tests
run: |
passed=$(grep -oP 'passed="\K[0-9]+' ado.trx | head -1)
failed=$(grep -oP 'failed="\K[0-9]+' ado.trx | head -1)
skipped=$(grep -oP 'skipped="\K[0-9]+' ado.trx | head -1)
total=$((passed + failed + skipped))
elapsed=$(grep -oP 'duration="\K[0-9\.]+' ado.trx | head -1 | cut -d'"' -f1)
[[ -z "$elapsed" ]] && elapsed="-"
echo "| ADO.NET | $passed | $failed | $skipped | $total | ${elapsed}s |" >> ../../../summary-table.md
- name: Run ADO.NET Specification Tests
working-directory: ./src/Ydb.Sdk/test/Ydb.Sdk.Ado.Specification.Tests
run: dotnet test --logger "trx;LogFileName=spec.trx"
- name: Parse Specification test results
working-directory: ./src/Ydb.Sdk/test/Ydb.Sdk.Ado.Specification.Tests
run: |
passed=$(grep -oP 'passed="\K[0-9]+' spec.trx | head -1)
failed=$(grep -oP 'failed="\K[0-9]+' spec.trx | head -1)
skipped=$(grep -oP 'skipped="\K[0-9]+' spec.trx | head -1)
total=$((passed + failed + skipped))
elapsed=$(grep -oP 'duration="\K[0-9\.]+' spec.trx | head -1 | cut -d'"' -f1)
[[ -z "$elapsed" ]] && elapsed="-"
echo "| Specification | $passed | $failed | $skipped | $total | ${elapsed}s |" >> ../../../summary-table.md
- name: Run ADO.NET Dapper Tests
working-directory: ./src/Ydb.Sdk/test/Ydb.Sdk.Ado.Dapper.Tests
run: dotnet test --logger "trx;LogFileName=dapper.trx"
- name: Parse Dapper test results
working-directory: ./src/Ydb.Sdk/test/Ydb.Sdk.Ado.Dapper.Tests
run: |
passed=$(grep -oP 'passed="\K[0-9]+' dapper.trx | head -1)
failed=$(grep -oP 'failed="\K[0-9]+' dapper.trx | head -1)
skipped=$(grep -oP 'skipped="\K[0-9]+' dapper.trx | head -1)
total=$((passed + failed + skipped))
elapsed=$(grep -oP 'duration="\K[0-9\.]+' dapper.trx | head -1 | cut -d'"' -f1)
[[ -z "$elapsed" ]] && elapsed="-"
echo "| Dapper | $passed | $failed | $skipped | $total | ${elapsed}s |" >> ../../../summary-table.md
- name: Run Topic Tests
working-directory: ./src/Ydb.Sdk/test/Ydb.Sdk.Topic.Tests
run: dotnet test --logger "trx;LogFileName=topic.trx"
- name: Parse Topic test results
working-directory: ./src/Ydb.Sdk/test/Ydb.Sdk.Topic.Tests
run: |
passed=$(grep -oP 'passed="\K[0-9]+' topic.trx | head -1)
failed=$(grep -oP 'failed="\K[0-9]+' topic.trx | head -1)
skipped=$(grep -oP 'skipped="\K[0-9]+' topic.trx | head -1)
total=$((passed + failed + skipped))
elapsed=$(grep -oP 'duration="\K[0-9\.]+' topic.trx | head -1 | cut -d'"' -f1)
[[ -z "$elapsed" ]] && elapsed="-"
echo "| Topic | $passed | $failed | $skipped | $total | ${elapsed}s |" >> ../../../summary-table.md
- name: Publish all test summary as table
if: always()
run: |
cat summary-table.md >> $GITHUB_STEP_SUMMARY
efcore-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
working-directory: ./src/EFCore.Ydb/test/EntityFrameworkCore.Ydb.FunctionalTests/
run: dotnet test --logger "trx;LogFileName=efcore.trx"
- name: Publish EFCore test summary
if: always()
working-directory: ./src/EFCore.Ydb/test/EntityFrameworkCore.Ydb.FunctionalTests/
run: |
passed=$(grep -oP 'passed="\K[0-9]+' efcore.trx | head -1)
failed=$(grep -oP 'failed="\K[0-9]+' efcore.trx | head -1)
skipped=$(grep -oP 'skipped="\K[0-9]+' efcore.trx | head -1)
total=$((passed + failed + skipped))
elapsed=$(grep -oP 'duration="\K[0-9\.]+' efcore.trx | head -1 | cut -d'"' -f1)
[[ -z "$elapsed" ]] && elapsed="-"
echo '| Test Suite | ✓ Passed | ✗ Failed | ↻ Skipped | ∑ Total | ⏱ Elapsed |' > efcore-summary.md
echo '|:---------- | -------: | -------: | --------: | ------: | --------: |' >> efcore-summary.md
echo "| EFCore | $passed | $failed | $skipped | $total | ${elapsed}s |" >> efcore-summary.md
cat efcore-summary.md >> $GITHUB_STEP_SUMMARY
run-examples:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
ydb-version: [ 'latest', 'trunk' ]
dotnet-version: [ 8.0.x, 9.0.x ]
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