Skip to content

Split job in two

Split job in two #20

Workflow file for this run

name: m2-actions-sequra-core-test
on: [push]
jobs:
magento2-test:
runs-on: ubuntu-latest
container: ubuntu
name: 'm2 unit and integration tests'
services:
mysql:
image: docker://mysql:8.0
env:
MYSQL_ROOT_PASSWORD: magento
MYSQL_DATABASE: magento
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
opensearch:
image: ghcr.io/mad-i-t/magento-opensearch:2.5.0
ports:
- 9200:9200
options: -e="discovery.type=single-node" -e "plugins.security.disabled=true" --health-cmd="curl http://localhost:9200/_cluster/health" --health-interval=10s --health-timeout=5s --health-retries=10
rabbitmq:
image: docker://rabbitmq:3.8-alpine
env:
RABBITMQ_DEFAULT_USER: "magento"
RABBITMQ_DEFAULT_PASS: "magento"
RABBITMQ_DEFAULT_VHOST: "/"
ports:
- 5672:5672
strategy:
matrix:
magento_version: [2.4.6]
steps:
- name: 'install fresh magento repo'
uses: MAD-I-T/magento-actions@v3.25
env:
COMPOSER_AUTH: ${{secrets.COMPOSER_AUTH}}
with:
process: 'install-magento'
magento_version: ${{ matrix.magento_version }}
no_push: 1 ## add this arg to not push to the repo ideal for quick test on specific version
### Download our code in custom dir###
- uses: actions/checkout@v3
with:
path: magento/app/code/Sequra/Core
- name: 'launch magento2 unit test'
if: always()
uses: MAD-I-T/magento-actions@v3.25
env:
COMPOSER_AUTH: ${{secrets.COMPOSER_AUTH}}
with:
process: 'unit-test'
unit_test_subset_path: 'app/code/Sequra/Core/Test/Unit'
override_settings: 1
# Integrations tests
- name: "copy integration test's phpunit.xml"
run: cp magento/app/code/Sequra/Core/Test/Integration/phpunit.xml.dist magento/dev/tests/integration/phpunit.xml
- name: 'To run all test in copied phpunit.xml'
uses: MAD-I-T/magento-actions@master
env:
COMPOSER_AUTH: ${{secrets.COMPOSER_AUTH}}
with:
process: 'integration-test'
unit_test_subset_path: "Sequra_Core Integration Tests"
magento2-checks:
runs-on: ubuntu-latest
container: ubuntu
name: 'm2 Standards, MD and PHPStan'
steps:
### Download our code in custom dir###
- uses: actions/checkout@v3
with:
path: Sequra_Core
- name: 'phpstan'
if: always()
uses: MAD-I-T/magento-actions@v3.25
with:
process: 'phpstan'
exec_path: '../Sequra_Core'
- name: 'mess detector'
if: always()
uses: MAD-I-T/magento-actions@v3.25
with:
process: 'mess-detector'
md_src_path: '../Sequra_Core'
- name: 'Magento coding standard checking'
if: always()
uses: MAD-I-T/magento-actions@v3.25
with:
process: 'phpcs-test'
extension: 'Sequra_Core'
severity: 10
standard: 'Magento2'