Skip to content

Merge pull request #2 from IriksIT/dependabot/github_actions/actions/… #23

Merge pull request #2 from IriksIT/dependabot/github_actions/actions/…

Merge pull request #2 from IriksIT/dependabot/github_actions/actions/… #23

name: Integration Tests
on: [push, pull_request]
jobs:
build:
strategy:
matrix:
include:
- PHP_VERSION: php81-fpm
MAGENTO_VERSION: 2.4.6
- PHP_VERSION: php82-fpm
MAGENTO_VERSION: 2.4.6
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Start Docker
run: docker run --detach --name magento-project-community-edition michielgerritsen/magento-project-community-edition:${{ matrix.PHP_VERSION }}-magento${{ matrix.MAGENTO_VERSION }}
- name: Remove version from composer.json
run: sed -i '/version/d' ./composer.json
- name: Upload the code into the docker container
run: docker cp $(pwd) magento-project-community-edition:/data/extensions/ && docker exec magento-project-community-edition composer require iriks-it/module-whereami:@dev
- name: Activate the extension
run: docker exec magento-project-community-edition ./retry "php bin/magento module:enable IriksIT_WhereAmI && php bin/magento setup:upgrade"
- name: Run tests
run: docker exec magento-project-community-edition /bin/bash -c "cd /data/dev/tests/integration/ && /data/vendor/bin/phpunit -c /data/dev/tests/integration/phpunit.xml"