ci(*): Remove temporary hack #37
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.6" ] | |
php-version: [ "8.2" ] | |
magento-repository: ['https://repo.magento.com/'] | |
name: MFTF test suite | |
if: ${{ !contains(github.event.head_commit.message, 'chore(') }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone current repository | |
uses: actions/checkout@v3 | |
- 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 }} | |
- 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.6 | |
if: startsWith(matrix.m2-version, '2.4.6') | |
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 | |