diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml new file mode 100644 index 0000000..8eddf39 --- /dev/null +++ b/.github/workflows/static-analysis.yml @@ -0,0 +1,21 @@ +name: Static Analysis +on: + push: +jobs: + phpstsan: + name: phpstan + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Configure PHP environment + uses: shivammathur/setup-php@v2 + with: + php-version: '7.4' + extensions: mbstring, intl + coverage: none + - uses: ramsey/composer-install@v2 + with: + composer-options: "--ignore-platform-reqs --optimize-autoloader" + - name: Run PHPStan static analysis + run: composer test:analysis diff --git a/.github/workflows/tests-php.yml b/.github/workflows/tests-php.yml new file mode 100644 index 0000000..b63c3b5 --- /dev/null +++ b/.github/workflows/tests-php.yml @@ -0,0 +1,27 @@ +name: Tests +on: + push: +jobs: + tests: + name: tests + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Configure PHP environment + uses: shivammathur/setup-php@v2 + with: + php-version: '7.4' + extensions: mbstring, intl + coverage: none + - uses: ramsey/composer-install@v2 + with: + composer-options: "--ignore-platform-reqs --optimize-autoloader" + - name: Setup git + run: | + git config --global user.name "GitHub Actions" + git config --global user.email "<>" + - name: Migrate PHPUnit configuration + run: vendor/bin/phpunit --migrate-configuration + - name: Run tests + run: php vendor/bin/phpunit --bootstrap=tests/bootstrap.php --no-coverage