Skip to content
Merged
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
71 changes: 22 additions & 49 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,20 @@ name: Lion-Request (CI Workflow)
on:
push:
branches:
- actions
- php-actions
pull_request:
branches:
- main
- 7.x
- 8.x
paths:
- '.github/workflows/**'
- 'src/**'
- 'tests/**'
- 'composer.json'
- 'composer.lock'
- 'phpunit.xml'

env:
PHP_VERSION: 8.5

jobs:
install-dependencies:
Expand All @@ -20,7 +29,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.4
php-version: ${{ env.PHP_VERSION }}
extensions: mbstring, gd, zip

- name: Install PHP dependencies
Expand All @@ -33,13 +42,6 @@ jobs:
key: php-vendor-${{ runner.os }}-${{ github.run_id }}
restore-keys: php-vendor-${{ runner.os }}-${{ github.run_id }}

- name: Cache composer.lock
uses: actions/cache@v4
with:
path: composer.lock
key: php-composer-lock-${{ runner.os }}-${{ github.run_id }}
restore-keys: php-composer-lock-${{ runner.os }}-${{ github.run_id }}

composer-validation:
runs-on: ubuntu-latest
name: Composer Validation
Expand All @@ -52,16 +54,9 @@ jobs:
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
php-version: ${{ env.PHP_VERSION }}
extensions: mbstring, gd, zip

- name: Restore composer.lock from cache
uses: actions/cache@v4
with:
path: composer.lock
key: php-composer-lock-${{ runner.os }}-${{ github.run_id }}
restore-keys: php-composer-lock-${{ runner.os }}-${{ github.run_id }}

- name: Restore vendor directory from cache
uses: actions/cache@v4
with:
Expand All @@ -87,20 +82,13 @@ jobs:
pull-requests: write

steps:
- name: 'Checkout Repository'
- name: Check out the repository
uses: actions/checkout@v4

- name: Restore composer.lock from cache
uses: actions/cache@v4
with:
path: composer.lock
key: php-composer-lock-${{ runner.os }}-${{ github.run_id }}
restore-keys: php-composer-lock-${{ runner.os }}-${{ github.run_id }}

- name: Dependency Review
uses: actions/dependency-review-action@v4
with:
base-ref: main
base-ref: ${{ github.event.repository.default_branch }}
head-ref: ${{ github.sha }}
comment-summary-in-pr: true
# Possible values: "critical", "high", "moderate", "low"
Expand All @@ -120,16 +108,9 @@ jobs:
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
php-version: ${{ env.PHP_VERSION }}
extensions: mbstring, gd, zip

- name: Restore composer.lock from cache
uses: actions/cache@v4
with:
path: composer.lock
key: php-composer-lock-${{ runner.os }}-${{ github.run_id }}
restore-keys: php-composer-lock-${{ runner.os }}-${{ github.run_id }}

- name: Restore vendor directory from cache
uses: actions/cache@v4
with:
Expand Down Expand Up @@ -158,8 +139,7 @@ jobs:
tests-phpunit:
runs-on: ubuntu-latest
name: PHPUnit
needs:
- static-code-analysis
needs: static-code-analysis

steps:
- name: Checkout repository
Expand All @@ -168,7 +148,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.4
php-version: ${{ env.PHP_VERSION }}
extensions: mbstring, gd, zip, xdebug
coverage: xdebug
ini-values: |
Expand All @@ -177,13 +157,6 @@ jobs:
xdebug.log_level=0
tools: composer

- name: Restore composer.lock from cache
uses: actions/cache@v4
with:
path: composer.lock
key: php-composer-lock-${{ runner.os }}-${{ github.run_id }}
restore-keys: php-composer-lock-${{ runner.os }}-${{ github.run_id }}

- name: Restore vendor directory from cache
uses: actions/cache@v4
with:
Expand All @@ -201,10 +174,10 @@ jobs:
token: ${{ secrets.CODECOV_TOKEN_LION_REQUEST }}

tests-infection:
if: false
runs-on: ubuntu-latest
name: Infection
needs:
- static-code-analysis
needs: static-code-analysis

steps:
- name: Checkout repository
Expand All @@ -213,7 +186,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.4
php-version: ${{ env.PHP_VERSION }}
extensions: mbstring, gd, zip

- name: Restore composer.lock from cache
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM php:8.4-apache
FROM php:8.5-apache

ARG DEBIAN_FRONTEND=noninteractive
# ----------------------------------------------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
}
},
"require": {
"php": ">=8.4"
"php": ">=8.5"
},
"require-dev": {
"lion/test": "^2.0 || ^3.0",
Expand Down
6 changes: 3 additions & 3 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.