-
Notifications
You must be signed in to change notification settings - Fork 15
32 lines (26 loc) · 1.38 KB
/
unit-test.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
name: Unit Tests
on: [pull_request]
jobs:
build:
strategy:
matrix:
include:
- PHP_VERSION: php74-fpm
MAGENTO_VERSION: 2.3.7
- PHP_VERSION: php74-fpm
MAGENTO_VERSION: 2.4.0
- PHP_VERSION: php81-fpm
MAGENTO_VERSION: 2.4.4
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- 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: Create branch for Composer and remove version from composer.json
run: git checkout -b continuous-integration-test-branch && 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 paazl/magento2-checkout-widget:@dev --no-plugins
- name: Activate the extension and run setup:upgrade
run: docker exec magento-project-community-edition ./retry "php bin/magento module:enable Paazl_CheckoutWidget && php bin/magento setup:upgrade && php bin/magento setup:di:compile"
- name: Run tests
run: docker exec magento-project-community-edition bash -c "vendor/bin/phpunit extensions/*/Test/Unit"