-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathreusable-storage-independant-tests.yml
More file actions
139 lines (129 loc) · 4.8 KB
/
reusable-storage-independant-tests.yml
File metadata and controls
139 lines (129 loc) · 4.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
name: Run storage-independant tests
run-name: Run Core tests
on:
workflow_call:
inputs:
build_config:
description: 'Build configuration'
required: true
default: 'Release'
type: string
target_framework:
description: 'Target framework'
required: true
default: 'net8.0'
type: string
test_output_verbosity:
description: 'Verbosity for dotnet test command'
required: true
default: 'minimal'
type: string
run_core:
description: 'Run Xtensive.Orm.Tests.Core tests'
required: true
default: true
type: boolean
run_log4net:
description: 'Run Xtensive.Orm.Logging.log4net tests'
required: true
default: true
type: boolean
run_nlog:
description: 'Run Xtensive.Orm.Logging.NLog tests'
required: true
default: true
type: boolean
test_run_timeout:
description: 'Timeout for all tests'
required: true
default: 10
type: number
publish_raw_results:
description: 'Publix TRX files as artifacts'
required: false
default: false
type: boolean
permissions:
contents: read
actions: read
checks: write
jobs:
run_core_tests:
name: Run Core tests
runs-on: ubuntu-latest
if: ${{ inputs.run_core || inputs.run_log4net || inputs.run_nlog }}
env:
BUILD_NUMBER: ${{ github.run_number }}
DO_TargetFrameworks: ${{ inputs.target_framework }}
TEST_RESULTS_FOLDER: _Build/tests/${{ inputs.build_config }}/${{ inputs.target_framework }}/no-database
steps:
- name: downgrade OpenSSL for net5.0
if: $${{ contains(inputs.target_framework, 'net5.0') }}
timeout-minutes: 3
run: |
wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb
sudo dpkg -i libssl1.1_1.1.0g-2ubuntu4_amd64.deb
- name: Checkout repo (last commit)
if: ${{ github.event_name == 'pull_request_review' || github.event_name == 'pull_request' || inputs.specific_sha == '' || github.ref_type != 'branch' }}
timeout-minutes: 1
uses: actions/checkout@v4
- name: Checkout repo (last 50 commit)
if: ${{ github.event_name != 'pull_request_review' && github.event_name != 'pull_request' && inputs.specific_sha != '' && github.ref_type == 'branch' }}
timeout-minutes: 5
uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}
fetch-depth: 50
# it leads to detached HEAD, but we don't commit anything anyway
- name: Manual commit checkout if required
if: ${{ inputs.specific_sha != '' && github.reg_type == 'branch' }}
run: git checkout ${{ inputs.specific_sha }}
- name: Setup .NETs
if: ${{ success() }}
timeout-minutes: 2
uses: ./.github/actions/setup-dotnets
with:
target_framework: ${{ env.DO_TargetFrameworks }}
- name: Build Orm
if: ${{ success() }}
timeout-minutes: 5
run: dotnet build Orm.sln -c ${{ inputs.build_config }}
- name: Run tests
id: complex_tests
if: ${{ success() }}
timeout-minutes: ${{ inputs.test_run_timeout }}
uses: ./.github/actions/run-databaseless-tests
with:
build_config : ${{ inputs.build_config }}
test_output_verbosity: ${{ inputs.test_output_verbosity }}
test_results_folder: ${{ env.TEST_RESULTS_FOLDER }}
run_core: ${{ fromJSON(inputs.run_core) }}
run_log4net: ${{ fromJSON(inputs.run_log4net) }}
run_nlog: ${{ fromJSON(inputs.run_nlog) }}
- name: Publish raw test results as files
if: |
(!cancelled() && inputs.publish_raw_results) || failure()
timeout-minutes: 1
uses: actions/upload-artifact@v4
with:
name: DO_${{ github.ref_name }}_${{ github.run_number }}
path: |
${{ env.TEST_RESULTS_FOLDER }}/**
if-no-files-found: error
retention-days: 1
- name: Make Final Test report
if: |
!cancelled()
&& ((github.event_name == 'push') || (github.event_name == 'pull_request') || (github.event_name == 'workflow_dispatch')
|| (steps.reprocessing.outcome == 'failure' || steps.complex_tests.outcome == 'failure'))
timeout-minutes: 1
uses: dorny/test-reporter@v2.1.1
with:
name: RESULTS - Core Tests
path: ${{ env.TEST_RESULTS_FOLDER }}/*.trx
reporter: dotnet-trx
fail-on-empty: true
#list-suites: 'all'
#list-tests: ${{ (inputs.publish_raw_results || inputs.reduced_results) && 'failed' || 'all' }}
list-suites: 'failed'
list-tests: 'failed'