Skip to content

Commit

Permalink
Merge pull request #2 from dcsg/upgrade-php-versions
Browse files Browse the repository at this point in the history
upgrade php versions
  • Loading branch information
dcsg committed Mar 21, 2022
2 parents f785ec9 + 3772e98 commit 19c5d79
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 1 deletion.
67 changes: 67 additions & 0 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: "PHPUnit"

on:
push:
paths-ignore:
- 'examples/**'
pull_request:
paths-ignore:
- 'examples/**'

env:
COMPOSER_FLAGS: "--ansi --no-interaction --no-progress --prefer-dist"
SYMFONY_PHPUNIT_VERSION: ""

jobs:
tests:
name: "PHPUnit"

runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental }}

strategy:
matrix:
include:
- php-version: "7.2"
experimental: false
- php-version: "7.4"
experimental: false
- php-version: "8.0"
experimental: false
- php-version: "8.1"
experimental: false
fail-fast: false

steps:
- name: "Checkout"
uses: "actions/checkout@v3"

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
extensions: "intl, zip"
ini-values: "memory_limit=-1"
php-version: "${{ matrix.php-version }}"

- name: "Determine composer cache directory"
id: "determine-composer-cache-directory"
run: "echo \"::set-output name=directory::$(composer config cache-dir)\""

- name: "Cache dependencies installed with composer"
uses: "actions/cache@v2"
with:
path: "${{ steps.determine-composer-cache-directory.outputs.directory }}"
key: "php-${{ matrix.php-version }}-symfony-php-unit-version-${{ env.SYMFONY_PHPUNIT_VERSION }}-${{ hashFiles('**/composer.lock') }}"
restore-keys: "php-${{ matrix.php-version }}-symfony-php-unit-version-${{ env.SYMFONY_PHPUNIT_VERSION }}"

- name: "Install highest dependencies"
if: "matrix.experimental == true"
run: "composer config platform --unset && composer update ${{ env.COMPOSER_FLAGS }}"

- name: "Install locked dependencies"
if: "matrix.experimental == false"
run: "composer config platform --unset && composer update ${{ env.COMPOSER_FLAGS }}"

- name: "Run PHPUnit"
run: "vendor/bin/phpunit"
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ sudo: false
php:
- 7.2
- 7.3
- 7.4
- 8.0
- 8.1

matrix:

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
}
],
"require": {
"php": "^7.2"
"php": "^7.2|^7.4|^8.0|^8.1"
},
"require-dev": {
"phpunit/phpunit": "^8",
Expand Down

0 comments on commit 19c5d79

Please sign in to comment.