-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtestflow-instead-of-wordpress.yaml
More file actions
113 lines (96 loc) · 3.22 KB
/
testflow-instead-of-wordpress.yaml
File metadata and controls
113 lines (96 loc) · 3.22 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
# TestFlow Configuration - Instead of WordPress Example
# This example shows how to use SQL files instead of WordPress installation
# with automatic URL search and replace functionality
name: "Instead of WordPress Example"
description: "Use SQL database dump instead of WordPress installation"
# Lando environment configuration
lando:
php: '8.2'
mysql: '8.0'
wordpress: '6.4'
# Playwright test configuration
playwright:
testDir: 'tests/e2e'
patterns:
- '**/*.test.js'
timeout: 30000
retries: 1
workers: 1
# Plugin configuration
plugins:
zips:
- 'plugins/*.zip'
installPath: 'wp-content/plugins'
preActivate: true
activateList:
- 'my-plugin'
# WordPress configuration (used for admin credentials and site URL)
wordpress:
adminUser: 'admin'
adminPassword: 'password'
adminEmail: 'admin@example.com'
siteUrl: 'https://testflow.lndo.site'
# SQL configuration - Instead of WordPress installation
sql:
# SQL files to use instead of WordPress installation
files:
- 'data/production-backup.sql'
# Use SQL files instead of WordPress installation
insteadOfWordPress: true
# Continue on SQL errors (optional)
continueOnError: false
# Search and replace configuration for URL corrections
searchReplace:
enabled: true
# URL to replace from the SQL dump
fromUrl: 'https://production-site.com'
# URL to replace to (will use wordpress.siteUrl if not specified)
toUrl: 'https://testflow.lndo.site'
# Additional custom replacements
additionalReplacements:
- from: 'production-cdn.com'
to: 'testflow.lndo.site'
- from: '/wp-content/uploads/production'
to: '/wp-content/uploads'
# Matrix testing with different SQL scenarios
matrix:
environments:
- name: 'Clean WordPress Install'
description: 'Standard WordPress installation'
insteadOfWordPress: false
plugins: ['my-plugin']
- name: 'Production Data Import'
description: 'Import production database with URL replacement'
sql_files: ['data/production-backup.sql']
insteadOfWordPress: true
searchReplace:
fromUrl: 'https://production-site.com'
toUrl: 'https://testflow.lndo.site'
plugins: ['my-plugin', 'production-plugin']
- name: 'Staging Data Import'
description: 'Import staging database with URL replacement'
sql_files: ['data/staging-backup.sql']
insteadOfWordPress: true
searchReplace:
fromUrl: 'https://staging-site.com'
toUrl: 'https://testflow.lndo.site'
plugins: ['my-plugin']
- name: 'Multi-site Setup'
description: 'WordPress multisite configuration'
sql_files: ['data/multisite-backup.sql']
insteadOfWordPress: true
searchReplace:
fromUrl: 'https://multisite.com'
toUrl: 'https://testflow.lndo.site'
plugins: ['my-plugin', 'multisite-plugin']
- name: 'Legacy Data Migration'
description: 'Test with older WordPress data structure'
php: '7.4'
mysql: '5.7'
wordpress: '5.9'
sql_files: ['data/legacy-backup.sql']
insteadOfWordPress: true
searchReplace:
fromUrl: 'https://legacy-site.com'
toUrl: 'https://testflow.lndo.site'
plugins: ['my-plugin']