Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.x] Test on PHP 8.1 and 8.2 #80

Open
wants to merge 7 commits into
base: 1.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 19 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,41 +4,57 @@ on: [ pull_request ]
jobs:
tests:
name: PHPUnit PHP ${{ matrix.php }} ${{ matrix.dependency }} (Symfony ${{ matrix.symfony }})
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix:
php:
- '7.2'
- '7.3'
- '7.4'
- '8.0'
- '8.1'
- '8.2'
dependency:
- ''
- 'lowest'
symfony:
- '4.4.*'
- '5.3.*'
- '5.4.*'
- '6.0.*'
- '6.3.*'
exclude:
- php: '7.2'
symfony: '4.4.*'
dependency: 'lowest'
- php: '7.2'
symfony: '6.0.*'
- php: '7.2'
symfony: '6.3.*'
- php: '7.3'
symfony: '4.4.*'
- php: '7.3'
symfony: '6.0.*'
- php: '7.3'
symfony: '6.3.*'
- php: '7.4'
symfony: '4.4.*'
- php: '7.4'
symfony: '6.0.*'
- php: '7.4'
symfony: '6.3.*'
- php: '8.0'
symfony: '4.4.*'
- php: '8.0'
symfony: '6.3.*'
- php: '8.1'
dependency: 'lowest'
- php: '8.2'
dependency: 'lowest'
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -50,16 +66,12 @@ jobs:
- name: Configure Symfony
run: composer config extra.symfony.require "${{ matrix.symfony }}"

- name: Prefer unstable Composer dependencies if Symfony 6.0
if: matrix.symfony == '6.0.*'
run: composer config prefer-stable false

- name: Get Composer Cache Directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ name: Static analysis
jobs:
phpstan:
name: PHPStan
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -25,11 +25,11 @@ jobs:

php-cs-fixer:
name: PHP-CS-Fixer
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -43,10 +43,10 @@ jobs:

psalm:
name: Psalm
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -63,18 +63,18 @@ jobs:

composer-normalize:
name: Composer Normalize
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

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

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.0
coverage: none
tools: composer-normalize

- name: Checkout code
uses: actions/checkout@v2

- name: Normalize
run: composer-normalize --dry-run
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "nyholm/symfony-bundle-test",
"type": "library",
"description": "",
"license": "MIT",
"type": "library",
"authors": [
{
"name": "Tobias Nyholm",
Expand All @@ -19,6 +19,8 @@
"require-dev": {
"phpunit/phpunit": "^8.5 || ^9.4"
},
"minimum-stability": "dev",
"prefer-stable": true,
"autoload": {
"psr-4": {
"Nyholm\\BundleTest\\": "src/"
Expand All @@ -29,8 +31,6 @@
"Nyholm\\BundleTest\\Tests\\": "tests/"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
"test": "vendor/bin/phpunit",
"test-ci": "vendor/bin/phpunit --coverage-text --coverage-clover=build/coverage.xml"
Expand Down