Skip to content

Commit

Permalink
feat: Workflow changes (#22)
Browse files Browse the repository at this point in the history
* feat: Workflow changes

- Added PHP 8.2
- Added dependabot branches to testing environment

* feat: Workflow changes

- Added PHP 8.2 to tests workflow
- Added PHP version to vendor cache key

* fix: Workflow typo

- Fixed PHP version access in matrix
  • Loading branch information
stevenobird authored Sep 30, 2024
1 parent fe4e4b7 commit 6c7a4dd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
matrix:
operating-system: [ ubuntu-24.04 ]
# Limited by https://github.com/shivammathur/setup-php#github-hosted-runners
php-version: [ '8.3' ]
php-version: [ '8.2', '8.3' ]
dependency-stability: [ prefer-stable ]

name: build-laravel - PHP ${{ matrix.php-version }} (${{ matrix.operating-system }})
Expand All @@ -34,17 +34,16 @@ jobs:
id: actions-cache
with:
path: ${{ steps.composer-cache.outputs.dir }}
# could be extended in case multiple PHP versions are in use
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
key: ${{ runner.os }}-composer-php${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
${{ runner.os }}-composer-php${{ matrix.php-version }}-
- name: Restore vendor from cache
uses: actions/cache@v4.0.2
id: vendor-cache
with:
path: vendor
key: ${{ runner.os }}-build-${{ hashFiles('**/composer.lock') }}
key: ${{ runner.os }}-build-php${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }}

- name: Validate composer.json and composer.lock
run: composer validate --strict
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
branches:
- main
- develop
- 'dependabot/**'

env:
DB_CONNECTION: mysql
Expand All @@ -27,7 +28,7 @@ jobs:
matrix:
operating-system: [ ubuntu-24.04 ]
# Limited by https://github.com/shivammathur/setup-php#github-hosted-runners
php-version: [ '8.3' ]
php-version: [ '8.2', '8.3' ]
dependency-stability: [ prefer-stable ]

name: php-tests - PHP ${{ matrix.php-version }} (${{ matrix.operating-system }})
Expand Down Expand Up @@ -58,7 +59,7 @@ jobs:
id: vendor-cache
with:
path: vendor
key: ${{ runner.OS }}-build-${{ hashFiles('**/composer.lock') }}
key: ${{ runner.OS }}-build-php${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }}

- name: Prepare Laravel Application
run: |
Expand Down

0 comments on commit 6c7a4dd

Please sign in to comment.