Skip to content

Commit

Permalink
chore: add circleci config
Browse files Browse the repository at this point in the history
  • Loading branch information
frederickfogerty committed Dec 28, 2021
1 parent 4ded882 commit 25eef6b
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .circleci/config.yml
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"

0 comments on commit 25eef6b

Please sign in to comment.