Skip to content

Commit

Permalink
Merge pull request #31 from Oksydan/develop
Browse files Browse the repository at this point in the history
New version 2.2.0
  • Loading branch information
Oksydan authored Apr 23, 2023
2 parents 5707018 + f505995 commit a98a572
Show file tree
Hide file tree
Showing 26 changed files with 2,443 additions and 89 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: PHP tests

on: [push, pull_request]

jobs:
php-linter:
name: PHP Syntax check 7.4 => 8.1
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: PHP syntax checker 7.4
uses: prestashop/github-action-php-lint/7.4@master

- name: PHP syntax checker 8.0
uses: prestashop/github-action-php-lint/8.0@master

- name: PHP syntax checker 8.1
uses: prestashop/github-action-php-lint/8.1@master

php-cs-fixer:
name: PHP-CS-Fixer
runs-on: ubuntu-latest
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'

- name: Checkout
uses: actions/checkout@v3

- name: Cache dependencies
uses: actions/cache@v3
with:
path: vendor
key: php-${{ hashFiles('composer.lock') }}

- name: Install dependencies
run: composer install

- name: Run PHP-CS-Fixer
run: ./vendor/bin/php-cs-fixer fix --dry-run --diff --using-cache=no
9 changes: 9 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

$config = new PrestaShop\CodingStandards\CsFixer\Config();

/** @var \Symfony\Component\Finder\Finder $finder */
$finder = $config->setUsingCache(true)->getFinder();
$finder->in(__DIR__)->exclude('vendor');

return $config;
19 changes: 19 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
build-module-zip: build-composer build-zip

build-zip:
rm -rf is_imageslider.zip
cp -Ra $(PWD) /tmp/is_imageslider
rm -rf /tmp/is_imageslider/config_*.xml
rm -rf /tmp/is_imageslider/.github
rm -rf /tmp/is_imageslider/.gitignore
rm -rf /tmp/is_imageslider/.php-cs-fixer.cache
rm -rf /tmp/is_imageslider/.git
rm -rf /tmp/is_imageslider/img
mkdir /tmp/is_imageslider/img
mv -v /tmp/is_imageslider $(PWD)/is_imageslider
zip -r is_imageslider.zip is_imageslider
rm -rf $(PWD)/is_imageslider

build-composer:
composer install --no-dev -o

5 changes: 4 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,13 @@
}
},
"require": {
"php": ">=7.2.0"
"php": ">=7.4.0"
},
"config": {
"preferred-install": "dist",
"prepend-autoloader": false
},
"require-dev": {
"prestashop/php-dev-tools": "~4.0"
}
}
Loading

0 comments on commit a98a572

Please sign in to comment.