|
1 | 1 | name: Magento 2 Integration Tests |
2 | | -#on: ['push', 'pull_request'] |
3 | | -on: |
4 | | - release: |
5 | | - push: |
6 | | - branches: |
7 | | - - 'main' |
| 2 | +on: ['push', 'pull_request'] |
8 | 3 |
|
9 | 4 | jobs: |
10 | 5 | integration-tests: |
11 | 6 | name: Magento 2 Integration Tests |
12 | | - runs-on: self-hosted |
13 | | - #runs-on: ubuntu-latest |
| 7 | + #runs-on: self-hosted |
| 8 | + runs-on: ubuntu-latest |
14 | 9 | container: |
15 | | - image: yireo/magento2installed:2.4.7-p4 |
| 10 | + image: yireo/magento2installed:2.4.8-p3 |
16 | 11 | services: |
17 | 12 | mysql: |
18 | | - image: mysql:8.0 |
| 13 | + image: yireo/mariadb:10 |
19 | 14 | env: |
20 | 15 | MYSQL_ROOT_PASSWORD: root |
21 | 16 | MYSQL_USER: magento2 |
22 | 17 | MYSQL_PASSWORD: magento2 |
23 | 18 | MYSQL_DATABASE: magento2 |
24 | | - options: --tmpfs /tmp:rw --tmpfs /var/lib/mysql:rw --health-cmd="mysqladmin ping" |
| 19 | + options: --tmpfs /tmp:rw --tmpfs /var/lib/mysql:rw --health-cmd="mysqladmin ping" |
25 | 20 | opensearch: |
26 | | - image: yireo/opensearch-dummy |
| 21 | + image: yireo/opensearch:latest |
27 | 22 | env: |
28 | 23 | 'discovery.type': single-node |
29 | | - 'xpack.security.enabled': false |
30 | | - ES_JAVA_OPTS: "-Xms128m -Xmx128m" |
| 24 | + ES_JAVA_OPTS: "-Xms256m -Xmx256m" |
31 | 25 | options: --health-cmd="curl localhost:9200/_cluster/health?wait_for_status=yellow&timeout=60s" --health-interval=10s --health-timeout=5s --health-retries=3 |
32 | 26 | redis: |
33 | 27 | image: redis |
|
36 | 30 | - name: Checkout sources |
37 | 31 | uses: actions/checkout@v4 |
38 | 32 |
|
| 33 | + - name: Apply patch for reporting memory under Alpine |
| 34 | + run: cd /tmp/magento && curl -fsSL https://patch-diff.githubusercontent.com/raw/magento/magento2/pull/39216.diff | git apply |
| 35 | + |
| 36 | + - name: Apply patch for changing MySQL client configuration |
| 37 | + run: cd /tmp/magento && curl -fsSL https://patch-diff.githubusercontent.com/raw/magento/magento2/pull/40410.diff | git apply |
| 38 | + |
| 39 | + - name: Configure GitLab |
| 40 | + run: | |
| 41 | + test -n "${{ secrets.GITLAB_TOKEN }}" || exit 0 |
| 42 | + cd /tmp/magento |
| 43 | + composer config --auth gitlab-token.gitlab.yireo.com ${{ secrets.GITLAB_TOKEN }} |
| 44 | + composer config repositories.loki-checkout composer https://gitlab.yireo.com/api/v4/group/loki-checkout/-/packages/composer/packages.json |
| 45 | +
|
39 | 46 | - name: Add module source |
40 | 47 | run: | |
41 | 48 | export COMPOSER_NAME=`cat .module.ini | grep COMPOSER_NAME | cut -f2 -d= | tr -d '"'` |
|
53 | 60 | export MAGENTO_MODULE=${EXTENSION_VENDOR}_${EXTENSION_NAME} |
54 | 61 | cd /tmp/magento/dev/tests/integration/ |
55 | 62 | cp -R ${GITHUB_WORKSPACE}/.github/workflows/integration-tests/* . |
| 63 | + php ../../../vendor/bin/phpunit --atleast-version 9 && cp phpunit9.xml phpunit.xml |
| 64 | + php ../../../vendor/bin/phpunit --atleast-version 10 && cp phpunit10.xml phpunit.xml |
56 | 65 | php -d memory_limit=4G ../../../vendor/bin/phpunit -c phpunit.xml ../../../vendor/$COMPOSER_NAME/Test/Integration |
57 | 66 |
|
0 commit comments