Skip to content

Commit

Permalink
Replace setup-php action version to semver
Browse files Browse the repository at this point in the history
Update setup php actions & Require previous composer version for php7.1

Bump phpunit version to 8.5.23

https://stackoverflow.com/a/70974793/4175566

Disable php coverage for actions

Add composer global update to tests workflow

Bump phpunit 8 min version

Remove php 8.2 tests
  • Loading branch information
romanzipp committed Sep 30, 2022
1 parent 8dde33c commit 7712e48
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 21 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/php-cs-fixer.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
name: PHP-CS-Fixer

on: push
on: [ push ]

jobs:
phpcs:

runs-on: ubuntu-latest

steps:

- uses: actions/checkout@v2

- name: Setup PHP
uses: nanasess/setup-php@master
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
coverage: none

- name: Install dependencies
run: composer install --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
name: PHPStan

on: [push]
on: [ push ]

jobs:
phpstan:

runs-on: ubuntu-latest

steps:

- uses: actions/checkout@v2

- name: Setup PHP
uses: nanasess/setup-php@master
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
coverage: none

- name: Install dependencies
run: composer install --no-interaction --no-scripts --no-progress --prefer-dist
Expand Down
19 changes: 9 additions & 10 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,30 @@
name: Tests

on: [push, pull_request]
on: [ push, pull_request ]

jobs:
test:

strategy:
fail-fast: false
matrix:
php: [7.1, 7.2, 7.3, 7.4, 8.0, 8.1]
composer-dependency: [prefer-stable, prefer-lowest]

php: [ "7.1", "7.2", "7.3", "7.4", "8.0", "8.1" ]
composer-dependency: [ prefer-stable, prefer-lowest ]
name: "PHP ${{ matrix.php }} - ${{ matrix.composer-dependency }}"

runs-on: ubuntu-latest

steps:

- uses: actions/checkout@v2

- name: Setup PHP
uses: nanasess/setup-php@master
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:${{ matrix.php == '7.1' && 'v2.2' || 'v2' }}
coverage: none

- name: Install dependencies
run: composer update --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist --${{ matrix.composer-dependency }}
run: |
composer global update
composer update --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist --${{ matrix.composer-dependency }}
- name: Execute tests
run: vendor/bin/phpunit
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"friendsofphp/php-cs-fixer": "^3.0",
"orchestra/testbench": "^3.8|^4.0|^5.0|^6.0",
"phpstan/phpstan": "^0.12.99|^1.0",
"phpunit/phpunit": "^7.0|^8.0|^9.0",
"phpunit/phpunit": "^7.0|^8.5.30|^9.0",
"romanzipp/php-cs-fixer-config": "^3.0"
},
"autoload": {
Expand Down

0 comments on commit 7712e48

Please sign in to comment.