Skip to content

Commit

Permalink
chore: add prefer-lowest actions to unit test matrix (#2021)
Browse files Browse the repository at this point in the history
  • Loading branch information
bshaffer authored Dec 22, 2020
1 parent 1486680 commit 791f2b2
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .github/sync-repo-settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ branchProtectionRules:
isAdminEnforced: true
requiredStatusCheckContexts:
- 'PHP 5.6 Unit Test'
- 'PHP 5.6 --prefer-lowest Unit Test'
- 'PHP 7.0 Unit Test'
- 'PHP 7.1 Unit Test'
- 'PHP 7.2 Unit Test'
- 'PHP 7.3 Unit Test'
- 'PHP 7.4 Unit Test'
- 'PHP 8.0 Unit Test'
- 'PHP 8.0 --prefer-lowest Unit Test'
- 'PHP Style Check'
- 'cla/google'
requiredApprovingReviewCount: 1
Expand Down
22 changes: 17 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
name: Test Suite
on: [push, pull_request]
on:
push:
branches:
- master
pull_request:

jobs:
test:
runs-on: ${{ matrix.operating-system }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
operating-system: [ ubuntu-latest ]
php: [ "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0" ]
name: PHP ${{ matrix.php }} Unit Test
composer-flags: [""]
include:
- php: "5.6"
composer-flags: "--prefer-lowest"
- php: "8.0"
composer-flags: "--prefer-lowest"
name: PHP ${{ matrix.php }} ${{ matrix.composer-flags }} Unit Test
steps:
- uses: actions/checkout@v2
- name: Setup PHP
Expand All @@ -21,7 +30,10 @@ jobs:
with:
timeout_minutes: 10
max_attempts: 3
command: composer install
command: composer update ${{ matrix.composer-flags }}
- if: ${{ matrix.php == '8.0' || matrix.composer-flags == '--prefer-lowest' }}
name: Update guzzlehttp/ringphp dependency
run: composer update guzzlehttp/ringphp
- if: ${{ matrix.php == '5.6' || matrix.php == '7.0' || matrix.php == '7.1' }}
name: Run PHPUnit Patches
run: sh .github/apply-phpunit-patches.sh
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
"google/apiclient-services": "~0.13",
"firebase/php-jwt": "~2.0||~3.0||~4.0||~5.0",
"monolog/monolog": "^1.17|^2.0",
"phpseclib/phpseclib": "~0.3.10||~2.0",
"guzzlehttp/guzzle": "~5.3.1||~6.0||~7.0",
"phpseclib/phpseclib": "~2.0",
"guzzlehttp/guzzle": "~5.3.3||~6.0||~7.0",
"guzzlehttp/psr7": "^1.2"
},
"require-dev": {
"phpunit/phpunit": "^5.0||^8.5",
"phpunit/phpunit": "^5.7||^8.5.13",
"squizlabs/php_codesniffer": "~2.3",
"symfony/dom-crawler": "~2.1",
"symfony/css-selector": "~2.1",
Expand Down

0 comments on commit 791f2b2

Please sign in to comment.