-
Notifications
You must be signed in to change notification settings - Fork 86
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
1 changed file
with
38 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,38 @@ | ||
name: PHP Composer | ||
|
||
#whenever master has a PR or is pushed to | ||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
run: | ||
runs-on: ubuntu-18.04 | ||
strategy: | ||
#for each of the following versions of PHP, with and without --prefer-lowest | ||
matrix: | ||
php-versions: ['5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4'] | ||
|
||
#set the name for each job | ||
name: PHP ${{ matrix.php-versions }} | ||
steps: | ||
#sets up the correct version of PHP with necessary config options | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
ini-values: memory_limit=4G, phar.readonly=false | ||
|
||
#checkout the codebase from github | ||
- name: Checkout codebase | ||
uses: actions/checkout@v3 | ||
|
||
#run composer | ||
- name: Composer install | ||
run: composer install | ||
|
||
#run tests | ||
- name: Run test suite | ||
run: vendor/bin/phpunit |