forked from OrchardCMS/OrchardCore
-
Notifications
You must be signed in to change notification settings - Fork 1
214 lines (207 loc) · 7 KB
/
functional_all_db.yml
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
name: Functional Tests - All Databases
on:
# Manual trigger.
workflow_dispatch:
pull_request_review:
types: [submitted]
# Run it on main and release pushes too, in case we merge from a branch that's not up-to-date with the target branch
# and breaks something after merge (or if we push to main).
push:
paths-ignore:
- '**/*.md'
- 'mkdocs.yml'
- 'src/docs/**/*'
branches: [ main, release/** ]
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
jobs:
test_functional_mvc:
name: Functional Tests - MVC
# These conditions are needed because the workflow triggers on individual PR comments too, see
# https://github.com/orgs/community/discussions/124396.
# They either need to be repeated for each job, or we need to use a separate job (i.e. VM to run the condition) that
# triggers the others.
if: github.event_name == 'workflow_dispatch' ||
github.event_name == 'push' ||
github.event.review.state == 'APPROVED' ||
github.event.review.state == 'CHANGES_REQUESTED'
runs-on: ubuntu-latest
container:
image: cypress/included:9.6.1
steps:
- uses: actions/checkout@v4
# We need to install dotnet in the docker container.
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- uses: actions/setup-node@v4
with:
node-version: "15"
- name: Functional Tests
run: |
cd test/OrchardCore.Tests.Functional
npm install
npm run mvc:test
- uses: actions/upload-artifact@v4
if: failure()
with:
name: functional-mvc-screenshots
path: test/OrchardCore.Tests.Functional/mvc-tests/cypress/screenshots
retention-days: 3
test_functional_cms_sqlite:
name: Functional Tests - CMS Sqlite
if: github.event_name == 'workflow_dispatch' ||
github.event_name == 'push' ||
github.event.review.state == 'APPROVED' ||
github.event.review.state == 'CHANGES_REQUESTED'
runs-on: ubuntu-latest
container:
image: cypress/included:9.6.1
env:
OrchardCore__OrchardCore_YesSql__EnableThreadSafetyChecks: true
steps:
- uses: actions/checkout@v4
# We need to install dotnet in the docker container.
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Functional Tests
run: |
cd test/OrchardCore.Tests.Functional
npm install
npm run cms:test
- uses: actions/upload-artifact@v4
if: failure()
with:
name: functional-cms-sqlite-failure
path: |
test/OrchardCore.Tests.Functional/cms-tests/cypress/screenshots
src/OrchardCore.Cms.Web/App_Data/logs
retention-days: 3
test_functional_cms_postgresql:
name: Functional Tests - CMS Postgres
if: github.event_name == 'workflow_dispatch' ||
github.event_name == 'push' ||
github.event.review.state == 'APPROVED' ||
github.event.review.state == 'CHANGES_REQUESTED'
runs-on: ubuntu-latest
container:
image: cypress/included:9.6.1
services:
postgres:
image: postgres:11
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: admin
POSTGRES_DB: app
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
OrchardCore__ConnectionString: "User ID=postgres;Password=admin;Host=postgres;Port=5432;Database=app;"
OrchardCore__DatabaseProvider: "Postgres"
OrchardCore__OrchardCore_YesSql__EnableThreadSafetyChecks: true
steps:
- uses: actions/checkout@v4
# We need to install dotnet in the docker container.
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Functional Tests
run: |
cd test/OrchardCore.Tests.Functional
npm install
npm run cms:test
- uses: actions/upload-artifact@v4
if: failure()
with:
name: functional-cms-postgresql-failure
path: |
test/OrchardCore.Tests.Functional/cms-tests/cypress/screenshots
src/OrchardCore.Cms.Web/App_Data/logs
retention-days: 3
test_functional_cms_mysql:
name: Functional Tests - CMS MySql
if: github.event_name == 'workflow_dispatch' ||
github.event_name == 'push' ||
github.event.review.state == 'APPROVED' ||
github.event.review.state == 'CHANGES_REQUESTED'
runs-on: ubuntu-latest
container:
image: cypress/included:9.6.1
services:
mysql:
image: mysql:8
ports:
- 3306
env:
MYSQL_DATABASE: test
MYSQL_ROOT_PASSWORD: test123
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
env:
OrchardCore__ConnectionString: "server=mysql;uid=root;pwd=test123;database=test"
OrchardCore__DatabaseProvider: "MySql"
OrchardCore__OrchardCore_YesSql__EnableThreadSafetyChecks: true
steps:
- uses: actions/checkout@v4
# We need to install dotnet in the docker container.
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Functional Tests
run: |
cd test/OrchardCore.Tests.Functional
npm install
npm run cms:test
- uses: actions/upload-artifact@v4
if: failure()
with:
name: functional-cms-mysql-failure
path: |
test/OrchardCore.Tests.Functional/cms-tests/cypress/screenshots
src/OrchardCore.Cms.Web/App_Data/logs
retention-days: 3
test_functional_cms_mssql:
name: Functional Tests - CMS SqlServer 2019
if: github.event_name == 'workflow_dispatch' ||
github.event_name == 'push' ||
github.event.review.state == 'APPROVED' ||
github.event.review.state == 'CHANGES_REQUESTED'
runs-on: ubuntu-latest
container:
image: cypress/included:9.6.1
services:
mssql:
image: mcr.microsoft.com/mssql/server:2019-latest
ports:
- 1433
env:
ACCEPT_EULA: Y
MSSQL_SA_PASSWORD: Password12!
env:
OrchardCore__ConnectionString: "Server=mssql;Database=tempdb;User Id=sa;Password=Password12!;Encrypt=False"
OrchardCore__DatabaseProvider: "SqlConnection"
OrchardCore__OrchardCore_YesSql__EnableThreadSafetyChecks: true
steps:
- uses: actions/checkout@v4
# We need to install dotnet in the docker container.
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Functional Tests
run: |
cd test/OrchardCore.Tests.Functional
npm install
npm run cms:test
- uses: actions/upload-artifact@v4
if: failure()
with:
name: functional-cms-mssql-failure
path: |
test/OrchardCore.Tests.Functional/cms-tests/cypress/screenshots
src/OrchardCore.Cms.Web/App_Data/logs
retention-days: 3