Skip to content

Commit aacbee2

Browse files
committed
Merge branch '6.0' into 7.0
2 parents 9937ba7 + 401b00f commit aacbee2

File tree

11 files changed

+142
-2
lines changed

11 files changed

+142
-2
lines changed

.github/actions/run-database-tests/action.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ inputs:
77
required: true
88
default: 'Release'
99
type: string
10+
show_all_fails:
11+
description: 'No mute tests'
12+
type: boolean
13+
default: false
14+
required: true
1015
test_output_verbosity:
1116
description: 'Verbosity for dotnet test command'
1217
required: true
@@ -36,21 +41,29 @@ runs:
3641
using: "composite"
3742
steps:
3843
- name: Test Orm.Tests set of tests
44+
env:
45+
GA_NO_IGNORE: ${{ inputs.show_all_fails }}
3946
if: ${{ !cancelled() && fromJSON(inputs.run_main) }}
4047
shell: bash
4148
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 }}
4249

4350
- name: Test Orm.Tests.Sql set of tests
51+
env:
52+
GA_NO_IGNORE: ${{ inputs.show_all_fails }}
4453
if: ${{ !cancelled() && fromJSON(inputs.run_sql) }}
4554
shell: bash
4655
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 }}
4756

4857
- name: Test BulkOperations extension set of tests
58+
env:
59+
GA_NO_IGNORE: ${{ inputs.show_all_fails }}
4960
if: ${{ !cancelled() && fromJSON(inputs.run_extensions) }}
5061
shell: bash
5162
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 }}
5263

5364
- name: Test Localization extension set of tests
65+
env:
66+
GA_NO_IGNORE: ${{ inputs.show_all_fails }}
5467
if: ${{ !cancelled() && fromJSON(inputs.run_extensions) }}
5568
shell: bash
5669
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 }}
@@ -60,11 +73,15 @@ runs:
6073
# step. To not disturb normal tests execution Reprocessing tests moved outside the action.
6174

6275
- name: Test Security extension set of tests
76+
env:
77+
GA_NO_IGNORE: ${{ inputs.show_all_fails }}
6378
if: ${{ !cancelled() && fromJSON(inputs.run_extensions) }}
6479
shell: bash
6580
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 }}
6681

6782
- name: Test Tracking extension set of tests
83+
env:
84+
GA_NO_IGNORE: ${{ inputs.show_all_fails }}
6885
if: ${{ !cancelled() && fromJSON(inputs.run_extensions) }}
6986
shell: bash
7087
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 }}

.github/workflows/dispatched-firebird-tests.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ on:
1313
required: false
1414
default: ''
1515
type: string
16+
show_all_fails:
17+
description: 'No mute tests'
18+
type: boolean
19+
default: false
20+
required: true
1621
firebird30:
1722
description: 'Firebird 3.0'
1823
type: boolean
@@ -43,6 +48,7 @@ jobs:
4348
target_framework: ${{ matrix.net }}
4449
specific_sha: ${{ inputs.specific_sha }}
4550
fetch_depth: ${{ fromJSON(inputs.fetch_depth) }}
51+
show_all_fails: ${{ fromJSON(inputs.show_all_fails) }}
4652
test_output_verbosity: minimal
4753
test_run_timeout: 40
4854
run_main: true

.github/workflows/dispatched-mssql-tests.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ on:
1313
required: false
1414
default: ''
1515
type: string
16+
show_all_fails:
17+
description: 'No mute tests'
18+
type: boolean
19+
default: false
20+
required: true
1621
mssql2017:
1722
description: 'MS SQL Server 2017'
1823
type: boolean
@@ -53,6 +58,7 @@ jobs:
5358
target_framework: ${{ matrix.net }}
5459
specific_sha: ${{ inputs.specific_sha }}
5560
fetch_depth: ${{ fromJSON(inputs.fetch_depth) }}
61+
show_all_fails: ${{ fromJSON(inputs.show_all_fails) }}
5662
test_output_verbosity: minimal
5763
test_run_timeout: 50
5864
run_main: true
@@ -73,6 +79,7 @@ jobs:
7379
target_framework: ${{ matrix.net }}
7480
specific_sha: ${{ inputs.specific_sha }}
7581
fetch_depth: ${{ fromJSON(inputs.fetch_depth) }}
82+
show_all_fails: ${{ fromJSON(inputs.show_all_fails) }}
7683
test_output_verbosity: minimal
7784
test_run_timeout: 50
7885
run_main: true
@@ -93,6 +100,7 @@ jobs:
93100
target_framework: ${{ matrix.net }}
94101
specific_sha: ${{ inputs.specific_sha }}
95102
fetch_depth: ${{ fromJSON(inputs.fetch_depth) }}
103+
show_all_fails: ${{ fromJSON(inputs.show_all_fails) }}
96104
test_output_verbosity: minimal
97105
test_run_timeout: 50
98106
run_main: true

.github/workflows/dispatched-mysql5-tests.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ on:
1313
required: false
1414
default: ''
1515
type: string
16+
show_all_fails:
17+
description: 'No mute tests'
18+
type: boolean
19+
default: false
20+
required: true
1621
mysql55:
1722
description: 'MySQL 5.5'
1823
type: boolean
@@ -53,6 +58,7 @@ jobs:
5358
target_framework: ${{ matrix.net }}
5459
specific_sha: ${{ inputs.specific_sha }}
5560
fetch_depth: ${{ fromJSON(inputs.fetch_depth) }}
61+
show_all_fails: ${{ fromJSON(inputs.show_all_fails) }}
5662
test_output_verbosity: minimal
5763
test_run_timeout: 20
5864
run_main: true
@@ -73,6 +79,7 @@ jobs:
7379
target_framework: ${{ matrix.net }}
7480
specific_sha: ${{ inputs.specific_sha }}
7581
fetch_depth: ${{ fromJSON(inputs.fetch_depth) }}
82+
show_all_fails: ${{ fromJSON(inputs.show_all_fails) }}
7683
test_output_verbosity: minimal
7784
test_run_timeout: 30
7885
run_main: true

.github/workflows/dispatched-pgsql10-tests.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ on:
1313
required: false
1414
default: ''
1515
type: string
16+
show_all_fails:
17+
description: 'No mute tests'
18+
type: boolean
19+
default: false
20+
required: true
1621
pgsql100:
1722
description: 'PostgreSQL 10'
1823
type: boolean
@@ -63,6 +68,7 @@ jobs:
6368
target_framework: ${{ matrix.net }}
6469
specific_sha: ${{ inputs.specific_sha }}
6570
fetch_depth: ${{ fromJSON(inputs.fetch_depth) }}
71+
show_all_fails: ${{ fromJSON(inputs.show_all_fails) }}
6672
test_output_verbosity: minimal
6773
test_run_timeout: 30
6874
run_main: true
@@ -83,6 +89,7 @@ jobs:
8389
target_framework: ${{ matrix.net }}
8490
specific_sha: ${{ inputs.specific_sha }}
8591
fetch_depth: ${{ fromJSON(inputs.fetch_depth) }}
92+
show_all_fails: ${{ fromJSON(inputs.show_all_fails) }}
8693
test_output_verbosity: minimal
8794
test_run_timeout: 30
8895
run_main: true
@@ -103,6 +110,7 @@ jobs:
103110
target_framework: ${{ matrix.net }}
104111
specific_sha: ${{ inputs.specific_sha }}
105112
fetch_depth: ${{ fromJSON(inputs.fetch_depth) }}
113+
show_all_fails: ${{ fromJSON(inputs.show_all_fails) }}
106114
test_output_verbosity: minimal
107115
test_run_timeout: 30
108116
run_main: true
@@ -123,6 +131,7 @@ jobs:
123131
target_framework: ${{ matrix.net }}
124132
specific_sha: ${{ inputs.specific_sha }}
125133
fetch_depth: ${{ fromJSON(inputs.fetch_depth) }}
134+
show_all_fails: ${{ fromJSON(inputs.show_all_fails) }}
126135
test_output_verbosity: minimal
127136
test_run_timeout: 30
128137
run_main: true
@@ -143,6 +152,7 @@ jobs:
143152
target_framework: ${{ matrix.net }}
144153
specific_sha: ${{ inputs.specific_sha }}
145154
fetch_depth: ${{ fromJSON(inputs.fetch_depth) }}
155+
show_all_fails: ${{ fromJSON(inputs.show_all_fails) }}
146156
test_output_verbosity: minimal
147157
test_run_timeout: 30
148158
run_main: true

.github/workflows/dispatched-pgsql9-tests.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ on:
1313
required: false
1414
default: ''
1515
type: string
16+
show_all_fails:
17+
description: 'No mute tests'
18+
type: boolean
19+
default: false
20+
required: true
1621
pgsql91:
1722
description: 'PostgreSQL 9.1'
1823
type: boolean
@@ -71,6 +76,7 @@ jobs:
7176
target_framework: ${{ matrix.net }}
7277
specific_sha: ${{ inputs.specific_sha }}
7378
fetch_depth: ${{ fromJSON(inputs.fetch_depth) }}
79+
show_all_fails: ${{ fromJSON(inputs.show_all_fails) }}
7480
test_output_verbosity: minimal
7581
test_run_timeout: 30
7682
run_main: true
@@ -91,6 +97,7 @@ jobs:
9197
target_framework: ${{ matrix.net }}
9298
specific_sha: ${{ inputs.specific_sha }}
9399
fetch_depth: ${{ fromJSON(inputs.fetch_depth) }}
100+
show_all_fails: ${{ fromJSON(inputs.show_all_fails) }}
94101
test_output_verbosity: minimal
95102
test_run_timeout: 30
96103
run_main: true

.github/workflows/dispatched-sqlite-tests.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ on:
1313
required: false
1414
default: ''
1515
type: string
16+
show_all_fails:
17+
description: 'No mute tests'
18+
type: boolean
19+
default: false
20+
required: true
1621
sqlite3:
1722
description: 'SQLite 3'
1823
type: boolean
@@ -43,6 +48,7 @@ jobs:
4348
target_framework: ${{ matrix.net }}
4449
specific_sha: ${{ inputs.specific_sha }}
4550
fetch_depth: ${{ fromJSON(inputs.fetch_depth) }}
51+
show_all_fails: ${{ fromJSON(inputs.show_all_fails) }}
4652
test_output_verbosity: minimal
4753
test_run_timeout: 30
4854
run_main: true

.github/workflows/reusable-storage-dependant-tests.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ on:
2828
required: false
2929
default: 1
3030
type: number
31+
show_all_fails:
32+
description: 'No mute tests'
33+
type: boolean
34+
default: false
35+
required: true
3136
test_output_verbosity:
3237
description: 'Verbosity for dotnet test command'
3338
required: true
@@ -129,6 +134,8 @@ jobs:
129134
# Since composite action syntax does not allow to define step timeout
130135
# we have to run Reprocessing project here, because it may stuck in forever-loop
131136
- name: Test Reprocessing extension set of tests
137+
env:
138+
GA_NO_IGNORE: ${{ inputs.show_all_fails }}
132139
if: ${{ success() && inputs.run_extensions }}
133140
timeout-minutes: 5 # timeout here is VERY important because reprocessing tests concurrent execution which can cause forever loop
134141
run: dotnet test Extensions/Xtensive.Orm.Reprocessing.Tests/Xtensive.Orm.Reprocessing.Tests.csproj -c ${{ inputs.build_config }} --no-build --logger "trx;LogFileName=Xtensive.Orm.Reprocessing.Tests.trx" --results-directory ${{ env.TEST_RESULTS_FOLDER }} -v ${{ inputs.test_output_verbosity }}
@@ -139,6 +146,7 @@ jobs:
139146
uses: ./.github/actions/run-database-tests
140147
with:
141148
build_config: ${{ inputs.build_config }}
149+
show_all_fails: ${{ inputs.show_all_fails }}
142150
test_output_verbosity: ${{ inputs.test_output_verbosity }}
143151
test_results_folder: ${{ env.TEST_RESULTS_FOLDER }}
144152
run_main: ${{ fromJSON(inputs.run_main) }}

Orm/Xtensive.Orm.Tests.Framework/NUnitFrameworkExtensions/IgnoreIfGithubActionsAttribute.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,12 @@ protected override void OnAfterTestCheck(ITest test)
120120

121121
private void Check()
122122
{
123+
if (TestInfo.NoIgnoreOnGithubActions) {
124+
return;
125+
}
123126
if (Provider.HasValue && !StorageProviderInfo.Instance.CheckProviderIs(Provider.Value)) {
124127
return;
125128
}
126-
127129
if (TriggerEvent.HasValue && TriggerEvent != TestInfo.GithubActionTrigger) {
128130
return;
129131
}

Orm/Xtensive.Orm.Tests.Framework/TestInfo.cs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ public enum GithubActionsEvents
2222
PullRequest,
2323
WorkflowDispatch,
2424
WorkflowCall,
25+
WorkflowRun,
2526
Push,
2627
Schedule
2728
}
@@ -33,6 +34,8 @@ public static class TestInfo
3334
{
3435
private static readonly bool isBuildServer;
3536
private static readonly bool isGithubActions;
37+
private static readonly bool noIgnoreOnGithubActions;
38+
3639
private static readonly GithubActionsEvents? githubActionsTriggeredBy;
3740

3841
/// <summary>
@@ -63,6 +66,11 @@ public static class TestInfo
6366
/// </summary>
6467
public static bool IsGithubActions => isGithubActions;
6568

69+
/// <summary>
70+
/// In case of run on GinHubActions, no test ignore happens in <see cref="IgnoreIfGithubActionsAttribute"/> nor <see cref="IgnoreOnGithubActionsIfFailedAttribute"/>
71+
/// </summary>
72+
public static bool NoIgnoreOnGithubActions => noIgnoreOnGithubActions;
73+
6674
/// <summary>
6775
/// Gets the event that triggered test run within Github Actions environment.
6876
/// </summary>
@@ -93,6 +101,7 @@ private static IEnumerable<T> GetMethodAttributes<T>() where T : Attribute
93101
"pull_request_target" => GithubActionsEvents.PullRequest,
94102
"workflow_dispatch" => GithubActionsEvents.WorkflowDispatch,
95103
"workflow_call" => GithubActionsEvents.WorkflowCall,
104+
"workflow_run" => GithubActionsEvents.WorkflowRun,
96105
"schedule" => GithubActionsEvents.Schedule,
97106
_ => null
98107
};
@@ -101,7 +110,8 @@ private static IEnumerable<T> GetMethodAttributes<T>() where T : Attribute
101110
static TestInfo()
102111
{
103112
isBuildServer = Environment.GetEnvironmentVariable("TEAMCITY_VERSION") != null;
104-
isGithubActions = Environment.GetEnvironmentVariable("GITHUB_WORKSPACE") != null;
113+
isGithubActions = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("GITHUB_WORKSPACE"));
114+
noIgnoreOnGithubActions = isGithubActions && string.Equals(Environment.GetEnvironmentVariable("GA_NO_IGNORE"), "true", StringComparison.OrdinalIgnoreCase);
105115
githubActionsTriggeredBy = TryParseGithubEventName(Environment.GetEnvironmentVariable("GITHUB_EVENT_NAME"));
106116
}
107117
}

0 commit comments

Comments
 (0)