Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ rm -rf .php_cs.cache
rm -rf .php_cs.dist
rm -rf tests/
rm -rf _dev
rm phpunit.xml.dist
cd ../
rm -rf $moduleName.zip
zip $moduleName.zip -r ${moduleName}/
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,39 @@ jobs:
run: composer install
- name: Run PHP-CS-Fixer
run: ./vendor/bin/php-cs-fixer fix --dry-run --diff --using-cache=no --config tests/php/.php-cs-fixer.dist.php

# Run PHPUnit tests
phpunit:
name: PHPUnit Tests (PHP ${{ matrix.php-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-version: ['7.4', '8.1', '8.2', '8.3']
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: mbstring, xml, ctype, iconv, intl, pdo, pdo_mysql, dom, gd, json, zip
coverage: none

- name: Checkout
uses: actions/checkout@v3.1.0

- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install dependencies
run: composer install --prefer-dist --no-progress

- name: Run unit tests
run: composer test-unit
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,9 @@ upgrades/*.yml
tests/php/.php-cs-fixer.cache
vendor/*
/config.xml
/config_*.xml
/config_*.xml

# PHPUnit
/.phpunit.result.cache
/tests/phpunit.xml
/tests/coverage/
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[![GitHub stars](https://img.shields.io/github/stars/nenes25/hhmodulesmanager)](https://github.com/nenes25/hhmodulesmanager/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/nenes25/hhmodulesmanager)](https://github.com/nenes25/hhmodulesmanager/network)
[![Github All Releases](https://img.shields.io/github/downloads/nenes25/hhmodulesmanager/total.svg)]()
[![PHP Tests](https://github.com/nenes25/hhmodulesmanager/actions/workflows/php.yml/badge.svg)](https://github.com/nenes25/hhmodulesmanager/actions/workflows/php.yml)

Module Prestashop de gestion des mises à jour des modules et configuration via la CLI

Expand All @@ -26,8 +27,8 @@ Compatibility
| Php Version | Compatible |
|-------------|------------------------------|
| Under 7.4 | :x: |
| 7.4 | :heavy_check_mark: |
| 8.1 | :heavy_check_mark: |
| 8.2 | :interrobang: Not yet tested |
| 8.3 | :interrobang: Not yet tested |
| 8.4 | :interrobang: Not yet tested |
| 7.4 | :heavy_check_mark: (Tested in CI) |
| 8.1 | :heavy_check_mark: (Tested in CI) |
| 8.2 | :heavy_check_mark: (Tested in CI) |
| 8.3 | :heavy_check_mark: (Tested in CI) |
| 8.4 | :heavy_check_mark: (Linter only) |
17 changes: 16 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
"Hhennes\\ModulesManager\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Hhennes\\ModulesManager\\Tests\\": "tests/"
}
},
"config": {
"prepend-autoloader": false
},
Expand All @@ -22,10 +27,20 @@
],
"cs-fixer": [
"vendor/bin/php-cs-fixer fix --config tests/php/.php-cs-fixer.dist.php"
],
"test": [
"phpunit --configuration tests/phpunit.xml.dist"
],
"test-unit": [
"phpunit --configuration tests/phpunit.xml.dist --testsuite unit"
],
"test-integration": [
"phpunit --configuration tests/phpunit.xml.dist --testsuite integration"
]
},
"type": "prestashop-module",
"require-dev": {
"prestashop/php-dev-tools": "^4.3"
"prestashop/php-dev-tools": "^4.3",
"phpunit/phpunit": "^9.6"
}
}
Loading