-
Notifications
You must be signed in to change notification settings - Fork 11
98 lines (84 loc) · 3.12 KB
/
dusk.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
name: dusk
on:
push:
branches:
- master
- '*.x'
pull_request:
schedule:
- cron: '0 0 * * *'
jobs:
dusk:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- magento-version: 2.4.7-p2
magento-php-version: php82-fpm
rapidez-php-version: 8.2
- magento-version: 2.4.7-p2
magento-php-version: php83-fpm
rapidez-php-version: 8.3
- magento-version: 2.4.7-p3
magento-php-version: php82-fpm
rapidez-php-version: 8.2
- magento-version: 2.4.7-p3
magento-php-version: php83-fpm
rapidez-php-version: 8.3
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: "php bin/magento encryption:key:change -k 5AM3SD5SkwT8iwIxL6L1q8XQhzK3wk51; magerun2 config:store:set system/smtp/disable 1; magerun2 config:store:set checkout/options/enable_guest_checkout_login 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@v4
with:
name: artifact-P${{ matrix.rapidez-php-version }}-M${{matrix.magento-version}}-on-${{matrix.magento-php-version}}
path: |
tests/Browser/screenshots
tests/Browser/console
vendor/orchestra/testbench-dusk/laravel/storage/logs/laravel.log
docker-logs
magento/var/log