|
9 | 9 | - master |
10 | 10 |
|
11 | 11 | jobs: |
12 | | - static-tests: |
13 | | - name: Validate Format |
14 | | - runs-on: ubuntu-latest |
15 | | - steps: |
16 | | - - uses: actions/checkout@v1 |
17 | | - |
18 | | - - name: Validate Manifest |
19 | | - run: composer validate |
20 | | - |
21 | | - - name: Validate XML format |
22 | | - run: sudo apt-get install libxml2-utils -y && find . -type f -name '*.xml' -exec xmllint --noout {} + |
23 | | - |
24 | | - tests: |
25 | | - name: Tests |
26 | | - needs: static-tests |
| 12 | + lint: |
| 13 | + name: Linter |
| 14 | + uses: samjuk/gha-test-actions/.github/workflows/magento2-test-lint.yaml@master |
| 15 | + |
| 16 | + static: |
| 17 | + name: Static Analysis |
| 18 | + uses: samjuk/gha-test-actions/.github/workflows/magento2-test-static.yaml@master |
| 19 | + needs: lint |
| 20 | + |
| 21 | + unit-tests-ghas: |
| 22 | + name: Unit Tests (GHAS) |
| 23 | + uses: samjuk/gha-test-actions/.github/workflows/magento2-test-unit-module-ghas.yaml@master |
| 24 | + needs: static |
| 25 | + with: |
| 26 | + magento_version: ${{ matrix.magento_version }} |
27 | 27 | strategy: |
28 | 28 | fail-fast: false |
29 | 29 | matrix: |
30 | | - include: |
31 | | - - PHP_VERSION: php84-fpm |
32 | | - MAGENTO_VERSION: 2.4.8-p3 |
33 | | - - PHP_VERSION: php83-fpm |
34 | | - MAGENTO_VERSION: 2.4.7-p8 |
35 | | - - PHP_VERSION: php82-fpm |
36 | | - MAGENTO_VERSION: 2.4.6-p13 |
37 | | - - PHP_VERSION: php81-fpm |
38 | | - MAGENTO_VERSION: 2.4.5-p14 |
39 | | - - PHP_VERSION: php81-fpm |
40 | | - MAGENTO_VERSION: 2.4.4-p13 |
41 | | - - PHP_VERSION: php74-fpm |
42 | | - MAGENTO_VERSION: 2.4.3-p2 # @TODO: -p3 missing from upstream containers |
43 | | - runs-on: ubuntu-latest |
44 | | - steps: |
45 | | - - uses: actions/checkout@v1 |
46 | | - |
47 | | - - name: Start Docker |
48 | | - run: docker run --detach --name magento-project-community-edition michielgerritsen/magento-project-community-edition:${{ matrix.PHP_VERSION }}-magento${{ matrix.MAGENTO_VERSION }} |
49 | | - |
50 | | - - name: Upload our code into the docker container |
51 | | - run: docker cp $(pwd) magento-project-community-edition:/data/extensions/ |
52 | | - |
53 | | - - name: Install the extension in Magento |
54 | | - run: docker exec magento-project-community-edition composer require samjuk/m2-module-media-proxy:@dev |
55 | | - |
56 | | - - name: Run PHPStan |
57 | | - run: docker exec magento-project-community-edition bash -c "vendor/bin/phpstan analyse -c extensions/${{ github.event.repository.name }}/phpstan.neon extensions/${{ github.event.repository.name }}" |
58 | | - |
59 | | - - name: Run PHPCS |
60 | | - run: docker exec magento-project-community-edition bash -c "vendor/bin/phpcs --standard=Magento2 --extensions=php,phtml -p extensions/${{ github.event.repository.name }} --severity=6" |
61 | | - |
62 | | - - name: Run Unit Tests |
63 | | - run: docker exec magento-project-community-edition bash -c "vendor/bin/phpunit extensions/${{ github.event.repository.name }}/Test/Unit" |
64 | | - |
65 | | - - name: Code Compilation Test |
66 | | - run: docker exec magento-project-community-edition bash -c "php bin/magento setup:di:compile" |
67 | | - |
68 | | - - name: Run Integration Tests |
69 | | - run: docker exec magento-project-community-edition bash -c "php bin/magento deploy:mode:set developer && cd /data/dev/tests/integration/ && ../../../vendor/bin/phpunit" |
| 30 | + magento_version: |
| 31 | + - '2.4.8-p3' |
| 32 | + - '2.4.7-p8' |
| 33 | + - '2.4.6-p13' |
| 34 | + - '2.4.4-p13' |
0 commit comments