Remove PHPUnit dependency & create shell-script with description for it
This commit is contained in:
parent
f6093fb869
commit
7b7322a90a
6 changed files with 36 additions and 1459 deletions
8
.github/workflows/php.yml
vendored
8
.github/workflows/php.yml
vendored
|
@ -62,10 +62,8 @@ jobs:
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: composer install --prefer-dist
|
run: composer install --prefer-dist
|
||||||
|
|
||||||
- name: Install PHPUnit 8
|
- name: Setup PHPUnit 8
|
||||||
run: curl -O -L https://phar.phpunit.de/phpunit-8.phar
|
run: bin/dev/setup-phpunit.sh
|
||||||
&& chmod +x phpunit-8.phar
|
|
||||||
&& mv phpunit-8.phar /usr/local/bin/phpunit
|
|
||||||
|
|
||||||
- name: Copy default Friendica config
|
- name: Copy default Friendica config
|
||||||
run: cp config/local-sample.config.php config/local.config.php
|
run: cp config/local-sample.config.php config/local.config.php
|
||||||
|
@ -88,7 +86,7 @@ jobs:
|
||||||
run: vendor/bin/parallel-lint --exclude vendor/ --exclude view/asset/ .
|
run: vendor/bin/parallel-lint --exclude vendor/ --exclude view/asset/ .
|
||||||
|
|
||||||
- name: Test with phpunit
|
- name: Test with phpunit
|
||||||
run: /usr/local/bin/phpunit --configuration tests/phpunit.xml --coverage-clover clover.xml
|
run: $(git rev-parse --show-toplevel)/bin/phpunit --configuration tests/phpunit.xml --coverage-clover clover.xml
|
||||||
env:
|
env:
|
||||||
MYSQL_HOST: 127.0.0.1
|
MYSQL_HOST: 127.0.0.1
|
||||||
MYSQL_PORT: ${{ job.services.mariadb.ports[3306] }}
|
MYSQL_PORT: ${{ job.services.mariadb.ports[3306] }}
|
||||||
|
|
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -79,3 +79,6 @@ venv/
|
||||||
|
|
||||||
#Ignore log folder
|
#Ignore log folder
|
||||||
/log
|
/log
|
||||||
|
|
||||||
|
#Ignore temporary installed phpunit
|
||||||
|
/bin/phpunit
|
||||||
|
|
13
bin/dev/setup-phpunit.sh
Executable file
13
bin/dev/setup-phpunit.sh
Executable file
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
PHPUNIT="$(git rev-parse --show-toplevel)/bin/phpunit"
|
||||||
|
|
||||||
|
if ! [ -x "$PHPUNIT" ]; then
|
||||||
|
echo "Install PHPUnit 8"
|
||||||
|
cd /tmp/
|
||||||
|
curl -s -O -L https://phar.phpunit.de/phpunit-8.phar
|
||||||
|
chmod +x phpunit-8.phar
|
||||||
|
mv phpunit-8.phar $PHPUNIT
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Using $PHPUNIT $($PHPUNIT --version)"
|
|
@ -124,12 +124,9 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpdocumentor/reflection-docblock": "^3.0.2",
|
"php-parallel-lint/php-parallel-lint": "^1.2",
|
||||||
"phpunit/php-token-stream": "^1.4.2",
|
"mockery/mockery": "^1.3",
|
||||||
"mikey179/vfsstream": "^1.6",
|
"mikey179/vfsstream": "^1.6"
|
||||||
"mockery/mockery": "^1.2",
|
|
||||||
"johnkary/phpunit-speedtrap": "1.1",
|
|
||||||
"php-parallel-lint/php-parallel-lint": "^1.2"
|
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "phpunit"
|
"test": "phpunit"
|
||||||
|
|
1449
composer.lock
generated
1449
composer.lock
generated
File diff suppressed because it is too large
Load diff
13
tests/README.md
Normal file
13
tests/README.md
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
# Using the Friendica tests
|
||||||
|
|
||||||
|
## Install PHPUnit
|
||||||
|
|
||||||
|
Please use [setup-phpunit.sh](https://github.com/friendica/friendica/bin/dev/setup-phpunit.sh) to install the necessary PHPUnit version.
|
||||||
|
It will temporarily install the `phpunit` phar file into the `bin/` subdirectory
|
||||||
|
|
||||||
|
|
||||||
|
Currently, Friendica uses PHPUnit 8.
|
||||||
|
|
||||||
|
## Supported PHP versions of these tests
|
||||||
|
|
||||||
|
The Unit-Tests of Friendica requires at least PHP 7.2.
|
Loading…
Reference in a new issue