Skip to content

testing: results summary #8828

testing: results summary

testing: results summary #8828

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 |' > $GITHUB_WORKSPACE/summary-table.md
echo '|:---------- | -------: | -------: | --------: | ------: | --------: |' >> $GITHUB_WORKSPACE/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: |
counters=$(grep '<Counters ' ado.trx | head -1)
passed=$(echo "$counters" | grep -oP 'passed="\K[0-9]+')
failed=$(echo "$counters" | grep -oP 'failed="\K[0-9]+')
skipped=$(echo "$counters" | grep -oP 'skipped="\K[0-9]+')
total=$(echo "$counters" | grep -oP 'total="\K[0-9]+')
duration=$(grep -oP 'duration="\K[0-9\.]+(?=")' ado.trx | head -1)
[[ -z "$duration" ]] && duration="-"
echo "| ADO.NET | $passed | $failed | $skipped | $total | ${duration}s |" >> $GITHUB_WORKSPACE/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: |
counters=$(grep '<Counters ' spec.trx | head -1)
passed=$(echo "$counters" | grep -oP 'passed="\K[0-9]+')
failed=$(echo "$counters" | grep -oP 'failed="\K[0-9]+')
skipped=$(echo "$counters" | grep -oP 'skipped="\K[0-9]+')
total=$(echo "$counters" | grep -oP 'total="\K[0-9]+')
duration=$(grep -oP 'duration="\K[0-9\.]+(?=")' spec.trx | head -1)
[[ -z "$duration" ]] && duration="-"
echo "| Specification | $passed | $failed | $skipped | $total | ${duration}s |" >> $GITHUB_WORKSPACE/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: |
counters=$(grep '<Counters ' dapper.trx | head -1)
passed=$(echo "$counters" | grep -oP 'passed="\K[0-9]+')
failed=$(echo "$counters" | grep -oP 'failed="\K[0-9]+')
skipped=$(echo "$counters" | grep -oP 'skipped="\K[0-9]+')
total=$(echo "$counters" | grep -oP 'total="\K[0-9]+')
duration=$(grep -oP 'duration="\K[0-9\.]+(?=")' dapper.trx | head -1)
[[ -z "$duration" ]] && duration="-"
echo "| Dapper | $passed | $failed | $skipped | $total | ${duration}s |" >> $GITHUB_WORKSPACE/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: |
counters=$(grep '<Counters ' topic.trx | head -1)
passed=$(echo "$counters" | grep -oP 'passed="\K[0-9]+')
failed=$(echo "$counters" | grep -oP 'failed="\K[0-9]+')
skipped=$(echo "$counters" | grep -oP 'skipped="\K[0-9]+')
total=$(echo "$counters" | grep -oP 'total="\K[0-9]+')
duration=$(grep -oP 'duration="\K[0-9\.]+(?=")' topic.trx | head -1)
[[ -z "$duration" ]] && duration="-"
echo "| Topic | $passed | $failed | $skipped | $total | ${duration}s |" >> $GITHUB_WORKSPACE/summary-table.md
- name: Publish all test summary as table
if: always()
run: |
cat $GITHUB_WORKSPACE/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: |
counters=$(grep '<Counters ' efcore.trx | head -1)
passed=$(echo "$counters" | grep -oP 'passed="\K[0-9]+')
failed=$(echo "$counters" | grep -oP 'failed="\K[0-9]+')
skipped=$(echo "$counters" | grep -oP 'skipped="\K[0-9]+')
total=$(echo "$counters" | grep -oP 'total="\K[0-9]+')
duration=$(grep -oP 'duration="\K[0-9\.]+(?=")' efcore.trx | head -1)
[[ -z "$duration" ]] && duration="-"
echo '| Test Suite | ✓ Passed | ✗ Failed | ↻ Skipped | ∑ Total | ⏱ Elapsed |' > $GITHUB_WORKSPACE/efcore-summary.md
echo '|:---------- | -------: | -------: | --------: | ------: | --------: |' >> $GITHUB_WORKSPACE/efcore-summary.md
echo "| EFCore | $passed | $failed | $skipped | $total | ${duration}s |" >> $GITHUB_WORKSPACE/efcore-summary.md
cat $GITHUB_WORKSPACE/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