Skip to content

dusk

dusk #512

Workflow file for this run

name: dusk
on:
push:
pull_request:
schedule:
- cron: '0 0 * * *'
jobs:
dusk:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- magento-version: 2.4.5-p2
magento-php-version: php81-fpm
rapidez-php-version: 8.1
- magento-version: 2.4.5-p2
magento-php-version: php81-fpm
rapidez-php-version: 8.2
- magento-version: 2.4.6
magento-php-version: php81-fpm
rapidez-php-version: 8.1
- magento-version: 2.4.6
magento-php-version: php82-fpm
rapidez-php-version: 8.2
services:
magento:
image: michielgerritsen/magento-project-community-edition:${{matrix.magento-php-version}}-magento${{matrix.magento-version}}-sample-data
env:
URL: http://localhost:1234/
FLAT_TABLES: true
CUSTOM_ENTRYPOINT_COMMAND: "magerun2 config:store:set system/smtp/disable 1"
ports:
- 3307:3306
- 9200:9200
- 1234:80
name: P${{ matrix.rapidez-php-version }} - M${{matrix.magento-version}} on ${{matrix.magento-php-version}}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Yarn cache
uses: actions/setup-node@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.rapidez-php-version }}
extensions: mbstring, dom, fileinfo, mysql
coverage: none
- name: Install dependencies
run: composer install --prefer-dist --no-interaction
- name: Publish icons
run: php ./vendor/bin/testbench-dusk vendor:publish --tag="payment-icons"
- name: Prepare Laravel Dusk
run: composer run dusk:prepare
- name: Compile assets
run: composer run dusk:assets
- name: Wait for index to finish
run: for i in {1..60}; do [[ $(mysql -h 127.0.0.1 -P 3307 -u magento -ppassword -ss -r -e "CALL sys.table_exists('magento', 'catalog_product_flat_1', @exists); SELECT @exists;") == *"BASE TABLE"* ]] && break || sleep 5; done
- name: Execute tests
run: composer run dusk:test
- name: Dump docker logs
if: failure()
uses: jwalton/gh-docker-logs@v2
with:
dest: './docker-logs'
- name: Dump magento logs
if: failure()
run: |
mkdir -p magento/var
docker cp ${{ job.services.magento.id }}:/data/var/log magento/var/log
- name: Upload Artifact
if: failure()
uses: actions/upload-artifact@v2
with:
name: artifact
path: |
tests/Browser/screenshots
tests/Browser/console
vendor/orchestra/testbench-dusk/laravel/storage/logs/laravel.log
docker-logs
magento/var/log