-
Notifications
You must be signed in to change notification settings - Fork 1
81 lines (66 loc) · 2.59 KB
/
mftf-tests.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
name: MFTF tests
on:
push:
branches:
- main
paths-ignore:
- '**.md'
workflow_dispatch:
permissions:
contents: read
env:
# Allow ddev get to use a GitHub token to prevent rate limiting by tests
DDEV_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
mftf-test-suite:
strategy:
fail-fast: false
matrix:
# Last version
m2-version: [ "2.4.7" ]
php-version: [ "8.3" ]
magento-repository: ['https://repo.magento.com/']
database: ['mysql:5.7', 'mysql:8.0', 'mariadb:10.6']
name: MFTF test suite
if: ${{ !contains(github.event.head_commit.message, 'chore(') }}
runs-on: ubuntu-latest
steps:
- name: Clone current repository
uses: actions/checkout@v4
- name: Install Magento 2 with DDEV
id: magento2-install
uses: ./
with:
php_version: ${{ matrix.php-version }}
magento_version: ${{ matrix.m2-version }}
magento_repository: ${{ matrix.magento-repository }}
composer_auth: ${{ secrets.M2_COMPOSER_AUTH }}
database: ${{ matrix.database }}
- name: Add Selenium to DDEV
run: |
ddev get julienloizelet/ddev-magento2-mftf
cp .ddev/okaeli-add-on/magento2/custom_files/mftf/.credentials dev/tests/acceptance/.credentials
cp .ddev/okaeli-add-on/magento2/custom_files/mftf/.env.dist dev/tests/acceptance/.env
sed -i -e 's,REPLACE_BASE_URL,${{ steps.magento2-install.outputs.m2_url }},' dev/tests/acceptance/.env
ddev restart
- name: Configure Nginx for MFTF
run: |
cd .ddev && ddev nginx-config okaeli-add-on/magento2/custom_files/mftf/nginx-site.conf
- name: Disable some extensions for 2.4.7
if: startsWith(matrix.m2-version, '2.4.7')
run: |
ddev magento module:disable Magento_AdminAdobeImsTwoFactorAuth
- name: Disable some extensions for 2.4
if: startsWith(matrix.m2-version, '2.4')
run: |
ddev magento module:disable Magento_TwoFactorAuth
ddev magento module:disable Magento_AdminNotification
- name: Prepare for MFTF test
run: |
ddev magento config:set cms/wysiwyg/enabled disabled
ddev magento config:set admin/security/admin_account_sharing 1
ddev magento config:set admin/security/use_form_key 0
ddev magento cache:clean config full_page
ddev exec vendor/bin/mftf build:project
- name: Run AdminCreateNewCustomerOnStorefrontTest
run: ddev exec vendor/bin/mftf run:test AdminCreateNewCustomerOnStorefrontTest