diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 000000000..679d22906 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,53 @@ +name: PhpStorm Stubs Tests + +on: [push, pull_request, workflow_dispatch] + +jobs: + general: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + php: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2'] + name: Run tests against php ${{matrix.php}} + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Build Docker Container + run: docker-compose -f docker-compose.yml build >/dev/null + env: + PHP_VERSION: ${{matrix.php}} + + - name: Composer Install + run: docker-compose -f docker-compose.yml run -e PHP_VERSION=${{matrix.php}} test_runner composer update + env: + PHP_VERSION: ${{matrix.php}} + + - name: Dump Reflection To File + run: docker-compose -f docker-compose.yml run -e PHP_VERSION=${{matrix.php}} php_under_test /usr/local/bin/php tests/Tools/dump-reflection-to-file.php ReflectionData.json + env: + PHP_VERSION: ${{matrix.php}} + + - name: Run Tests + run: docker-compose -f docker-compose.yml run -e PHP_VERSION=${{matrix.php}} test_runner vendor/bin/phpunit --testsuite PHP_${{matrix.php}} + env: + PHP_VERSION: ${{matrix.php}} + additional: + runs-on: ubuntu-latest + name: Run cs-fixer and stubs structure tests + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Composer Install + run: docker-compose -f docker-compose.yml run test_runner composer install + + - name: Test PhpDoc + run: docker-compose -f docker-compose.yml run test_runner vendor/bin/phpunit --testsuite PhpDoc + + - name: Test Stubs Map, Structure and Reflection + run: docker-compose -f docker-compose.yml run test_runner vendor/bin/phpunit --testsuite Structure + + - name: run cs fixer + run: docker-compose -f docker-compose.yml run test_runner composer cs diff --git a/.github/workflows/testLinks.yml b/.github/workflows/testLinks.yml new file mode 100644 index 000000000..2cc556a8a --- /dev/null +++ b/.github/workflows/testLinks.yml @@ -0,0 +1,28 @@ +name: PhpStorm Stubs Check Links + +on: + workflow_dispatch: + schedule: + - cron: '0 0 1 * *' + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Composer Install + run: docker-compose -f docker-compose.yml run test_runner composer install + env: + PHP_VERSION: '8.0' + + - name: Build Docker Container + run: docker-compose -f docker-compose.yml build >/dev/null + env: + PHP_VERSION: '8.0' + + - name: Run Tests + run: docker-compose -f docker-compose.yml run -e CHECK_LINKS=true test_runner vendor/bin/phpunit --testsuite PhpDoc + env: + PHP_VERSION: '8.0' diff --git a/.github/workflows/testPeclExtensions.yml b/.github/workflows/testPeclExtensions.yml new file mode 100644 index 000000000..35f48771d --- /dev/null +++ b/.github/workflows/testPeclExtensions.yml @@ -0,0 +1,35 @@ +name: PhpStorm Stubs PECL Test + +on: + workflow_dispatch: + schedule: + - cron: '0 0 1 * *' + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Build Docker Container + run: docker-compose -f docker-compose.yml build >/dev/null + env: + PHP_VERSION: '8.0' + + - name: Composer Install + run: docker-compose -f docker-compose.yml run test_runner composer install + + - name: Dump Reflection With Pecl To File + run: docker-compose -f docker-compose.yml run pecl_extensions /usr/local/bin/php tests/Tools/dump-reflection-to-file.php ReflectionDataPecl.json + + - name: Dump Reflection Without Pecl To File + run: docker-compose -f docker-compose.yml run php_under_test /usr/local/bin/php tests/Tools/dump-reflection-to-file.php ReflectionData.json + + - name: Build Reflection Data With Pecl Only + run: docker-compose -f docker-compose.yml run php_under_test /usr/local/bin/php tests/Tools/dump-pecl-to-file.php + + - name: Run Tests + run: docker-compose -f docker-compose.yml run -e PHP_VERSION='8.0' test_runner vendor/bin/phpunit tests/ + env: + PHP_VERSION: '8.0' diff --git a/.gitignore b/.gitignore index 9f2c8a609..bc8b7a41d 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,14 @@ rest-client.private.env.json .idea/workspace.xml .idea/shelf -#Composer +# PHPUnit +phpunit.xml + +# Composer vendor -composer.lock \ No newline at end of file +composer.lock + +.php_cs.cache +.phpunit.result.cache + +ReflectionData.json diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml index c5aecf806..a7b0332eb 100644 --- a/.idea/inspectionProfiles/Project_Default.xml +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -8,6 +8,9 @@ + + +