-
Notifications
You must be signed in to change notification settings - Fork 19
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
1 parent
4ded882
commit 25eef6b
Showing
1 changed file
with
49 additions
and
0 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,49 @@ | ||
version: 2.1 # Use 2.1 to enable using orbs and other features. | ||
|
||
orbs: | ||
php: circleci/[email protected] | ||
|
||
jobs: | ||
test: | ||
parameters: | ||
version: | ||
default: "8.0" | ||
description: PHP version to install | ||
type: string | ||
docker: | ||
- image: cimg/php:<<parameters.version>> | ||
steps: | ||
- checkout | ||
- php/install-composer | ||
- run: composer self-update | ||
|
||
# Print php and composer versions for debugging | ||
- run: php --version | ||
- run: composer --version | ||
|
||
# although not recommended, we need to update dependencies to work on php8.1 | ||
- when: | ||
condition: | ||
equal: [ "8.1", <<parameters.version>> ] | ||
steps: | ||
- run: composer update | ||
|
||
# install deps | ||
- run: composer install | ||
|
||
# run tests | ||
- run: | ||
name: PHPUnit Tests | ||
command: vendor/bin/phpunit --bootstrap src/autoload.php tests | ||
|
||
workflows: | ||
version: 2 | ||
test: | ||
jobs: | ||
- test: | ||
matrix: | ||
parameters: | ||
version: | ||
- "7.4" | ||
- "8.0" | ||
- "8.1" |