File tree Expand file tree Collapse file tree 2 files changed +49
-0
lines changed Expand file tree Collapse file tree 2 files changed +49
-0
lines changed Original file line number Diff line number Diff line change 1+ name : CI for PS8 build
2+
3+ on :
4+ pull_request :
5+ branches :
6+ - ' **'
7+ push :
8+ branches :
9+ - ' main'
10+
11+ jobs :
12+ lint :
13+ name : PHP CS fixer
14+ runs-on : ubuntu-latest
15+
16+ steps :
17+ - name : Checkout code
18+ uses : actions/checkout@v3
19+
20+ - name : Setup PHP
21+ uses : shivammathur/setup-php@v2
22+ with :
23+ php-version : 7.4
24+
25+ - name : Install Composer
26+ run : |
27+ php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
28+ php composer-setup.php
29+ php -r "unlink('composer-setup.php');"
30+ sudo mv composer.phar /usr/local/bin/composer
31+
32+ - name : Prepare workflow
33+ run : |
34+ cp -r .env.dist .env || true
35+
36+ - name : Build docker image for ps8
37+ run : make build-ci module_version=ps8
38+
39+ - name : Run PHP CS Fixer for ps8
40+ run : make php-cs-fixer-ci module_version=ps8
Original file line number Diff line number Diff line change @@ -14,13 +14,22 @@ build:
1414 MODULE_VERSION=$(module_version ) docker compose build --no-cache
1515 # make build module_version=ps8
1616
17+ build-ci :
18+ composer install
19+ cd $$ {MODULE_VERSION} && composer install
20+ MODULE_VERSION=$(module_version ) SSL_ENABLED=$(ssl_enabled ) docker compose up -d --build
21+ # make build module_version=ps8
22+
1723down :
1824 docker compose down --remove-orphans
1925
2026php-cs-fixer :
2127 docker exec -i $$ {MODULE_VERSION}-ps-prestashop-$$ {PS_VERSION_TAG} /bin/bash -c " cd modules/ps_checkout && php vendor/bin/php-cs-fixer fix"
2228 # make php-cs-fixer module_version=ps8
2329
30+ php-cs-fixer-ci :
31+ docker exec -i ${MODULE_VERSION} -ps-prestashop-${PS_VERSION_TAG} /bin/bash -c " cd modules/ps_checkout && php vendor/bin/php-cs-fixer fix --dry-run --diff --verbose; exit \$\$ ?"
32+
2433autoindex :
2534 docker exec -i $$ {MODULE_VERSION}-ps-prestashop-$$ {PS_VERSION_TAG} /bin/bash -c " cd modules/ps_checkout && php vendor/bin/autoindex prestashop:add:index /var/www/html/modules/ps_checkout && php vendor/bin/autoindex prestashop:add:index /var/www/html/modules/ps_checkout/vendor"
2635 # make autoindex module_version=ps8
You can’t perform that action at this time.
0 commit comments