-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
45 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Analyse | ||
on: pull_request | ||
jobs: | ||
analyse: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: dependencies | ||
uses: php-actions/composer@v6 | ||
with: | ||
php_version: 8.3 | ||
php_extensions: bcmath | ||
|
||
- name: install tools | ||
run: | ||
mkdir --parents tools/phpstan tools/phpunit | ||
composer require phpstan/phpstan --working-dir=tools/phpstan --no-interaction --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist | ||
composer require phpunit/phpunit --working-dir=tools/phpunit --no-interaction --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist | ||
|
||
- name: analyse | ||
run: tools/phpstan/vendor/bin/phpstan --error-format=github --no-progress |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,30 @@ | ||
name: Test | ||
on: [pull_request] | ||
# on: [push, pull_request] # runs twice | ||
on: pull_request | ||
jobs: | ||
test: | ||
tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
- uses: actions/checkout@v2 | ||
|
||
- name: dependencies | ||
uses: php-actions/composer@v6 | ||
with: | ||
php_version: 8.3 | ||
php_extensions: zip gd bcmath | ||
php_extensions: bcmath | ||
|
||
- name: install tools | ||
run: composer install-tools | ||
- name: install phpunit | ||
run: | ||
mkdir --parents tools/phpunit | ||
composer require phpunit/phpunit --working-dir=tools/phpunit --no-interaction --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist | ||
|
||
- name: add printer | ||
run: composer require --dev mheap/phpunit-github-actions-printer | ||
# - name: Composer dependencies | ||
# run: composer require phpunit/phpunit --dev --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist | ||
|
||
- name: start server | ||
run: composer start-server & | ||
|
||
- name: configure matchers | ||
uses: mheap/phpunit-matcher-action@v1 | ||
- name: run tests | ||
run: tools/phpunit/vendor/bin/phpunit --printer mheap\\GithubActionsReporter\\Printer tests | ||
run: tools/phpunit/vendor/bin/phpunit --teamcity tests | ||
env: | ||
XDEBUG_MODE: coverage |