Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
f9ef0d2
Indentation
alex-kulakov Sep 16, 2025
d9426e7
Correct link to reusable workflow
alex-kulakov Sep 17, 2025
e7c0337
Correct link to reusable workflow
alex-kulakov Sep 17, 2025
7e7f144
Correct link to reusable workflow
alex-kulakov Sep 17, 2025
907d84c
Downgrade version of openssl to be compatible with netcoreapp2.0 (hop…
alex-kulakov Oct 1, 2025
2c28e07
Fix unmatched version of openssl in install command
alex-kulakov Oct 1, 2025
6bdb5a2
Try fix error with firebird communication
alex-kulakov Oct 1, 2025
c4f5fb8
Disable WireCrypt in firebird container
alex-kulakov Oct 1, 2025
fe1137c
Firebird container: auth settings changed
alex-kulakov Oct 1, 2025
a171a6e
Fix wrong config writing
alex-kulakov Oct 1, 2025
9b36aa4
Try use WireEncrypt enabled
alex-kulakov Oct 1, 2025
6a5995b
Revert WireCrypt to disabled
alex-kulakov Oct 1, 2025
d16f88d
Downgrade openssl to fix error
alex-kulakov Oct 1, 2025
ac78924
Chinook model: Dropping created view
alex-kulakov Oct 1, 2025
d47492f
Enable publishing raw results for some test runs
alex-kulakov Oct 2, 2025
d383efd
No multiple access to virtual member
alex-kulakov Oct 2, 2025
2d5066b
Fix path to sakila data file for linux runtimes
alex-kulakov Oct 2, 2025
d20fd6f
Fix path to sakila data file for linux runtimes
alex-kulakov Oct 2, 2025
eac5612
Merge branch '6.0' into 7.0
alex-kulakov Oct 2, 2025
73a43bb
Try set exact version of .net for netcoreapp2.0
alex-kulakov Oct 2, 2025
5ad5bc7
Try use NET 5 SDK for netcoreapp2.0
alex-kulakov Oct 3, 2025
403b8b4
Try use Net Core 3.1 SDK for netcoreapp2.0
alex-kulakov Oct 3, 2025
250163c
Revert change of setup version for netcoreapp2.0 + set exact version …
alex-kulakov Oct 3, 2025
ebde0b7
Merge branch '6.0' into 6.0-gt-actions-preparation
alex-kulakov Oct 3, 2025
2fcf88e
Add dedicated test for double statement delimiter
alex-kulakov Oct 3, 2025
2628b5e
No new line after batch item for MySQL
alex-kulakov Oct 3, 2025
104ba5c
Add temp log messages
alex-kulakov Oct 4, 2025
77f27b9
Use Environment.NewLine as NewLine in translator
alex-kulakov Oct 4, 2025
68014a6
No hard-coded windows-style new line symbols
alex-kulakov Oct 4, 2025
ec2df5f
Remove temporary logs placed before
alex-kulakov Oct 4, 2025
32b5707
Slight improvements of SqlTranslator.BuildBatch()
alex-kulakov Oct 4, 2025
e6cd64d
No hard-coded windows-style new line symbols
alex-kulakov Oct 6, 2025
e8f67a8
Apply standard BatchItemDelimiter
alex-kulakov Oct 6, 2025
2a13f47
No hard-coded windows-style new line symbols
alex-kulakov Oct 6, 2025
fe60b08
Try use reduced data for ordering test
alex-kulakov Oct 6, 2025
987edf7
Temporary log ordered sequences
alex-kulakov Oct 6, 2025
2234996
Fix compilation error
alex-kulakov Oct 6, 2025
adcddae
Revert adding output of order results and apply provider filter to tests
alex-kulakov Oct 6, 2025
30836be
Add ordered items output for ordering issue investigation
alex-kulakov Oct 7, 2025
55e5914
Remove unsupported by test framework storage from running list
alex-kulakov Oct 6, 2025
3644a2a
Revert change to specific version of netcoreapp2.0
alex-kulakov Oct 7, 2025
5579886
Merge branch '6.0' into 6.0-gt-actions-preparation
alex-kulakov Oct 7, 2025
1123371
Try not use 'USA' abbreviation in test dataset to avoid ordering issues
alex-kulakov Oct 7, 2025
2be8420
Replace USA with United States in query filter expressions
alex-kulakov Oct 7, 2025
cacbc07
Add Accuracy usage for results of double type
alex-kulakov Oct 7, 2025
f0b3f89
Tests changes
alex-kulakov Oct 8, 2025
1f8efde
Remove commented code
alex-kulakov Oct 8, 2025
dd2a21e
Merge branch '6.0-gt-actions-preparation' into 6.0
alex-kulakov Oct 8, 2025
640eb04
Merge branch '6.0' into 7.0
alex-kulakov Oct 8, 2025
4ed83d8
Revert change to exact version of sdk for netcoreapp3.1
alex-kulakov Oct 8, 2025
9937ba7
Remove unsupported version of postgres
alex-kulakov Oct 8, 2025
105e8f0
Add ability to have all the failed tests
alex-kulakov Oct 8, 2025
a3e84f2
Add ability to have all the failed tests (part 2)
alex-kulakov Oct 8, 2025
6c473ae
constant env value instead of dynamic parameter
alex-kulakov Oct 9, 2025
adc56c0
Add TestInfo tests with raw environment variables output
alex-kulakov Oct 9, 2025
3fa4041
Fix certain issues of TestInfo
alex-kulakov Oct 9, 2025
a3d8bd6
Fix wrong header of raw data output
alex-kulakov Oct 9, 2025
a2e9a23
Fix wrong expected value of environment value
alex-kulakov Oct 9, 2025
d2f243b
Revert switch to constant env value
alex-kulakov Oct 9, 2025
3cbf0b3
Improved TestInfo & its test
alex-kulakov Oct 9, 2025
e48c953
dispatched workflows allow not to mute failed tests
alex-kulakov Oct 9, 2025
401b00f
Postgres 11 for default run
alex-kulakov Oct 9, 2025
aacbee2
Merge branch '6.0' into 7.0
alex-kulakov Oct 9, 2025
5cb02ad
After-merge fixes
alex-kulakov Oct 9, 2025
58eb026
Merge branch '7.0' into 7.1
alex-kulakov Oct 9, 2025
a8205f1
No fetch depth as parameter
alex-kulakov Oct 9, 2025
8a0d43c
Merge branch '6.0' into 7.0
alex-kulakov Oct 9, 2025
689369e
After-merge fixes
alex-kulakov Oct 9, 2025
e4bb1d3
Merge branch '7.0' into 7.1
alex-kulakov Oct 9, 2025
56a690f
Apply accuracy for test results
alex-kulakov Oct 10, 2025
bf16461
Add auto-build and auto-tests for various providers
alex-kulakov Oct 14, 2025
16c4358
Merge branch '6.0' into 7.0
alex-kulakov Oct 20, 2025
84d40c6
After-merge workflows update
alex-kulakov Oct 21, 2025
4005733
Fix wrong trigger in workflow
alex-kulakov Oct 21, 2025
c2b8554
Merge branch '6.0' into 7.0
alex-kulakov Oct 21, 2025
eccd578
Merge branch '7.0' into 7.1
alex-kulakov Oct 21, 2025
ea694fe
Update branch filters
alex-kulakov Oct 21, 2025
28acc99
Merge branch '7.0' into 7.1
alex-kulakov Oct 21, 2025
e76c6b2
Workflow updates to meet 7.1 branch needs
alex-kulakov Oct 21, 2025
a6ef10b
Remove MySQL 5.5 auto tests, exists in dispatched though
alex-kulakov Oct 21, 2025
952b7ad
Merge branch '7.1'
alex-kulakov Oct 21, 2025
a3890a1
Update worflows to meet branch needs
alex-kulakov Oct 22, 2025
ece01db
Mistake in readme file fixed
alex-kulakov Oct 22, 2025
729d71d
Wrong ref to worflow corrected
alex-kulakov Oct 22, 2025
d2860f1
Some SQL Server WFs (cold ones) build only for one .NET
alex-kulakov Oct 22, 2025
201908c
Merge branch '7.1'
alex-kulakov Oct 22, 2025
7762a1a
Showing all fails in tests is optional setting
alex-kulakov Oct 22, 2025
4d54588
Merge branch '6.0' into 7.0
alex-kulakov Oct 22, 2025
0d7c880
Merge branch '7.0' into 7.1
alex-kulakov Oct 22, 2025
872fd87
Merge branch '7.1'
alex-kulakov Oct 22, 2025
e81f51e
Add workflow runs deletion - scheduled and manual
alex-kulakov Oct 22, 2025
849768f
Remove unused workflow
alex-kulakov Oct 22, 2025
07c8394
Wrong github endpoing
alex-kulakov Oct 22, 2025
8b7329c
Merge remote-tracking branch 'upstream/master' into mergeUpstream
SergeiPavlov Oct 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/actions/run-database-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ inputs:
required: true
default: 'Release'
type: string
show_all_fails:
description: 'No mute tests'
type: boolean
default: false
required: true
test_output_verbosity:
description: 'Verbosity for dotnet test command'
required: true
Expand Down Expand Up @@ -36,21 +41,29 @@ runs:
using: "composite"
steps:
- name: Test Orm.Tests set of tests
env:
GA_NO_IGNORE: ${{ inputs.show_all_fails }}
if: ${{ !cancelled() && fromJSON(inputs.run_main) }}
shell: bash
run: dotnet test Orm/Xtensive.Orm.Tests/Xtensive.Orm.Tests.csproj -c ${{ inputs.build_config }} --no-build --logger "trx;LogFileName=Xtensive.Orm.Tests.trx" --results-directory ${{ inputs.test_results_folder }} -v ${{ inputs.test_output_verbosity }}

- name: Test Orm.Tests.Sql set of tests
env:
GA_NO_IGNORE: ${{ inputs.show_all_fails }}
if: ${{ !cancelled() && fromJSON(inputs.run_sql) }}
shell: bash
run: dotnet test Orm/Xtensive.Orm.Tests.Sql/Xtensive.Orm.Tests.Sql.csproj -c ${{ inputs.build_config }} --no-build --logger "trx;LogFileName=Xtensive.Orm.Tests.Sql.trx" --results-directory ${{ inputs.test_results_folder }} -v ${{ inputs.test_output_verbosity }}

- name: Test BulkOperations extension set of tests
env:
GA_NO_IGNORE: ${{ inputs.show_all_fails }}
if: ${{ !cancelled() && fromJSON(inputs.run_extensions) }}
shell: bash
run: dotnet test Extensions/Xtensive.Orm.BulkOperations.Tests/Xtensive.Orm.BulkOperations.Tests.csproj -c ${{ inputs.build_config }} --no-build --logger "trx;LogFileName=Xtensive.Orm.BulkOperations.Tests.trx" --results-directory ${{ inputs.test_results_folder }} -v ${{ inputs.test_output_verbosity }}

- name: Test Localization extension set of tests
env:
GA_NO_IGNORE: ${{ inputs.show_all_fails }}
if: ${{ !cancelled() && fromJSON(inputs.run_extensions) }}
shell: bash
run: dotnet test Extensions/Xtensive.Orm.Localization.Tests/Xtensive.Orm.Localization.Tests.csproj -c ${{ inputs.build_config }} --no-build --logger "trx;LogFileName=Xtensive.Orm.Localization.Tests.trx" --results-directory ${{ inputs.test_results_folder }} -v ${{ inputs.test_output_verbosity }}
Expand All @@ -60,11 +73,15 @@ runs:
# step. To not disturb normal tests execution Reprocessing tests moved outside the action.

- name: Test Security extension set of tests
env:
GA_NO_IGNORE: ${{ inputs.show_all_fails }}
if: ${{ !cancelled() && fromJSON(inputs.run_extensions) }}
shell: bash
run: dotnet test Extensions/Xtensive.Orm.Security.Tests/Xtensive.Orm.Security.Tests.csproj -c ${{ inputs.build_config }} --no-build --logger "trx;LogFileName=Xtensive.Orm.Security.Tests.trx" --results-directory ${{ inputs.test_results_folder }} -v ${{ inputs.test_output_verbosity }}

- name: Test Tracking extension set of tests
env:
GA_NO_IGNORE: ${{ inputs.show_all_fails }}
if: ${{ !cancelled() && fromJSON(inputs.run_extensions) }}
shell: bash
run: dotnet test Extensions/Xtensive.Orm.Tracking.Tests/Xtensive.Orm.Tracking.Tests.csproj -c ${{ inputs.build_config }} --no-build --logger "trx;LogFileName=Xtensive.Orm.Tracking.Tests.trx" --results-directory ${{ inputs.test_results_folder }} -v ${{ inputs.test_output_verbosity }}
240 changes: 240 additions & 0 deletions .github/scripts/delete_workflow_runs.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,240 @@
param(
[Parameter(Mandatory)]
[string] $repo,
[Parameter(Mandatory)]
[string] $token,
[Parameter(Mandatory)]
[string] $keepDays
)

$baseUri = "https://api.github.com"
$repoBaseUri = "$baseUri/repos/$repo"
$actionsBaseUri = "$repoBaseUri/actions"
$runsBaseUri = "$actionsBaseUri/runs"

$headers = @{
Authorization = "Bearer $token"
Accept = "application/vnd.github+json"
}

function Get() {
param(
[string] $uri
)
return Invoke-RestMethod -Uri $uri -Headers $headers -Method Get
}

function DeleteRuns() {
param (
[System.Collections.ArrayList] $runIds
)

foreach ($id in $runIds) {
Write-Host "Deleting run $id"
$deleteUri = "$runsBaseUri/$id"
Invoke-RestMethod -Uri $deleteUri -Headers $headers -Method Delete
}
}

#
# Gets all workflow runs, finds among them the ones that meet deletion requirements
# (inactive workflow, closed pull-request or older than required days)
# and sorts them into several buckets - "inactive", "pull_request", "workflow_dispatch", "push"
# and "schedule"
#
function GetWorkflowRunsForDeletion()
{
[OutputType([System.Collections.Generic.Dictionary[System.String, System.Collections.ArrayList]])]
param (
[System.Int32] $storeDays
)

[System.Collections.Generic.HashSet[int]]$inactiveWorkflows = New-Object System.Collections.Generic.HashSet[int]

$allWorkflows = Invoke-RestMethod -Uri "$actionsBaseUri/workflows" -Headers $headers -Method Get

# number of workflows is less then number of runs
# so more efficient to get them all and find inactive ones
foreach ($wf in $allWorkflows.workflows) {
if ($wf.state -ne "active") {
$inactiveWorkflows.Add($wf.id) | Out-Null;
}
}

[System.Collections.Generic.Dictionary[System.String, System.Collections.ArrayList]]$result = New-Object System.Collections.Generic.Dictionary"[System.String, System.Collections.ArrayList]"

#keys of the dictionary equal to events of workflows
$result["pull_request"] = New-Object System.Collections.ArrayList
$result["workflow_dispatch"] = New-Object System.Collections.ArrayList
$result["push"] = New-Object System.Collections.ArrayList
$result["schedule"] = New-Object System.Collections.ArrayList
#special bucket
$result["inactive"] = New-Object System.Collections.ArrayList


$page = 1
$per_page = 100

do {
$uri = "$runsBaseUri" + "?page=$page&per_page=$per_page"
$response = Invoke-RestMethod -Uri $uri -Headers $headers -Method Get

if ($response.total_count -eq 0) {
return $result
}

[System.DateTime]$created = (Get-Date).AddDays(-$storeDays)

foreach ($run in $response.workflow_runs) {
if ($result.ContainsKey($run.event) -eq $true) {
# Doesn't matter how old the run is - if the workflow is inactive
# put it for deletion
if ($inactiveWorkflows.Contains($run.workflow_id)) {
$result["inactive"].Add($run) | Out-Null
}
else {
if ($run.event -eq "pull_request") {
# for PRs we collect only closed ones
if ($run.pull_requests.Count -eq 0) {
$result[$run.event].Add($run) | Out-Null
}
}
else {
# for the rest, we apply date filter
$created_at = [System.DateTime]::Parse($run.created_at)
if ($created_at -lt $created) {
$result[$run.event].Add($run) | Out-Null
}
}
}
}
}

$page++
} while ($response.workflow_runs.Count -eq $per_page)

return $result
}

#
# Deletes runs of inactive workflows (of pull_request, push, workflow_dispatch or schedule event)
#
function DeleteRunsOfInactiveWorkflows() {
param (
[System.Collections.Generic.Dictionary[System.String, System.Collections.ArrayList]] $groups
)

[System.Collections.ArrayList]$runs = $groups["inactive"]

if ($runs.Count -eq 0) {
Write-Host "No runs of inactive workflows. Skipping"
return
}

Write-Host "Deleting runs of inactive workflows"
$run_ids = $runs | Select-Object -ExpandProperty id
DeleteRuns $run_ids
}

#
# Deletes runs of closed pull-requests
#
function DeleteRunsForClosedPR() {
param (
[System.Collections.Generic.Dictionary[System.String, System.Collections.ArrayList]] $groups
)

[System.Collections.ArrayList]$runs = $groups["pull_request"]

if ($runs.Count -eq 0) {
Write-Host "No runs for closed pull requests. Skipping"
return
}

Write-Host "Deleting runs for closed pull requests"
$run_ids = $runs | Select-Object -ExpandProperty id
DeleteRuns $run_ids
}

#
# Deletes runs of 'workflow_dispatch' event marked for deletion
#
function DeleteOldDispatchedRuns() {
param (
[System.Collections.Generic.Dictionary[System.String, System.Collections.ArrayList]] $groups
)

[System.Collections.ArrayList]$runs = $groups["workflow_dispatch"]

if ($runs.Count -eq 0) {
Write-Host "No dispatched runs to delete. Skipping"
return
}

Write-Host "Deleting old runs that were dispatched"
$run_ids = $runs | Select-Object -ExpandProperty id
DeleteRuns $run_ids
}

#
# Deletes runs of 'push' event marked for deletion
#
function DeleteOldRunsOnPush() {
param (
[System.Collections.Generic.Dictionary[System.String, System.Collections.ArrayList]] $groups
)

[System.Collections.ArrayList]$runs = $groups["push"]

if ($runs.Count -eq 0) {
Write-Host "No runs triggered by push to delete. Skipping"
return
}

Write-Host "Deleting old runs triggered by push"
$run_ids = $runs | Select-Object -ExpandProperty id
DeleteRuns $run_ids
}

#
# Deletes runs of 'schedule' event marked for deletion
#
function DeleteOldScheduledRuns() {
param (
[System.Collections.Generic.Dictionary[System.String, System.Collections.ArrayList]] $groups
)

[System.Collections.ArrayList]$runs = $groups["schedule"]

if ($runs.Count -eq 0) {
Write-Host "No scheduled runs to delete. Skipping"
return
}

Write-Host "Deleting old runs triggered on schedule"
$run_ids = $runs | Select-Object -ExpandProperty id
DeleteRuns $run_ids
}

Write-Host "Collecting runs for closed PRs, inactive workflow runs, and other runs older than $keepDays days"

$preserveDays = [System.Int32]::Parse($keepDays)

$runsForDeletion = GetWorkflowRunsForDeletion $preserveDays

if ($runsForDeletion.ToString() -eq "System.Object[]")
{
# just in case somebody screws up method and forgot to apply out-null to some operation
# and results of method became array of objects
$runsForDeletion = $runsForDeletion[$runsForDeletion.Length - 1];
}

DeleteRunsOfInactiveWorkflows $runsForDeletion

DeleteRunsForClosedPR $runsForDeletion

DeleteOldDispatchedRuns $runsForDeletion

DeleteOldRunsOnPush $runsForDeletion

DeleteOldScheduledRuns $runsForDeletion
Loading