-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add .circleci/config.yml * Add php configuration * Add CC reporter * Configure cc test reporter * Sudo -E * Printenv * Wrap vars * Fix config * Enable coverage * Remove env vars * Optimise build * Add more php versions * Update job name * Use older version of xdebug for php 7.4 * Fix parameter * Update readme file
- Loading branch information
Showing
3 changed files
with
85 additions
and
35 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,75 @@ | ||
version: 2.1 | ||
|
||
commands: | ||
cc-reporter-pre: | ||
steps: | ||
- run: | ||
name: Download Code Climate test reporter | ||
command: curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ~/cc-test-reporter | ||
- run: | ||
name: Make Code Climate test reporter executable | ||
command: chmod a+x ~/cc-test-reporter | ||
- run: | ||
name: Initialise Code Climate test reporter | ||
command: ~/cc-test-reporter before-build | ||
cc-reporter-post: | ||
steps: | ||
- run: | ||
name: Send tests result to Code Climate | ||
command: ~/cc-test-reporter after-build --exit-code $? | ||
install-dependencies: | ||
parameters: | ||
xdebug_version: | ||
type: string | ||
steps: | ||
- run: | ||
name: Install dependencies | ||
command: composer install | ||
- run: | ||
name: Install xdebug | ||
command: sudo -E install-php-extensions xdebug-<< parameters.xdebug_version >> | ||
- run: | ||
name: Enable xdebug | ||
command: sudo -E docker-php-ext-enable xdebug | ||
build: | ||
steps: | ||
- run: | ||
name: Check coding style (PSR12) | ||
command: make phpcs | ||
- run: | ||
name: Run unit tests | ||
command: make phpunit-coverage | ||
|
||
jobs: | ||
build: | ||
parameters: | ||
php_version: | ||
type: string | ||
xdebug_version: | ||
type: string | ||
docker: | ||
- image: cimg/php:<< parameters.php_version >> | ||
resource_class: small | ||
steps: | ||
- checkout | ||
- install-dependencies: | ||
xdebug_version: << parameters.xdebug_version >> | ||
- cc-reporter-pre | ||
- build | ||
- cc-reporter-post | ||
|
||
workflows: | ||
ci: | ||
jobs: | ||
- build: | ||
name: build-php-<< matrix.php_version >> | ||
matrix: | ||
parameters: | ||
php_version: ["7.4"] | ||
xdebug_version: ["3.1.5"] | ||
- build: | ||
name: build-php-<< matrix.php_version >> | ||
matrix: | ||
parameters: | ||
php_version: ["8.0", "8.1", "8.2"] | ||
xdebug_version: ["stable"] |
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