Skip to content
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
21 changes: 11 additions & 10 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ on:
default: |
php artisan migrate:fresh --env=ci
php artisan test --env=ci --no-coverage
LINUX_PACKAGES:
description: A comma separated list of linux packages which should be installed.
BREW_FORMULAS:
description: A space separated list of brew formulas which should be installed.
required: false
type: string

Expand All @@ -86,7 +86,7 @@ jobs:
steps:
- name: Checkout code
# https://github.com/actions/checkout
uses: actions/checkout@v4
uses: actions/checkout@v7

- name: Setup PHP
# https://github.com/shivammathur/setup-php
Expand All @@ -98,12 +98,13 @@ jobs:
coverage: none

- name: Install additional packages
if: ${{ inputs.LINUX_PACKAGES != '' }}
# https://github.com/awalsh128/cache-apt-pkgs-action
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: ${{ inputs.LINUX_PACKAGES }}
version: ${{ inputs.PHP_VERSION }}
if: ${{ inputs.BREW_FORMULAS != '' }}
# Brew is available in the GitHub Runner Ubuntu image, but not in the PATH.
run: |
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
brew install ${{ inputs.BREW_FORMULAS }}
# Add brew package install path to the PATH for subsequent steps.
echo "/home/linuxbrew/.linuxbrew/bin" >> "$GITHUB_PATH"

# The GitHub runner PostgreSQL version is outdated, and will not work with databases using the latest PostgreSQL version.
- name: Update PostgreSQL
Expand All @@ -121,7 +122,7 @@ jobs:

- name: Cache composer dependencies
# https://github.com/actions/cache
uses: actions/cache@v4
uses: actions/cache@v6
with:
path: ${{ steps.get-cache-dir.outputs.directory }}
key: dependencies-laravel-${{ inputs.LARAVEL_VERSION }}-php-${{ inputs.PHP_VERSION }}-composer-${{ hashFiles('composer.json') }}
Expand Down
4 changes: 2 additions & 2 deletions examples/tests-multiple-db-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ jobs:
DATABASE_PORT: 5432
DATABASE_USERNAME: postgres
DATABASE_CONNECTION: pgsql
# DATABASE_HOST: 127.0.0.1
DATABASE_HOST: localhost # For some reason postgres runs extremely slow when not using localhost, while mysql and mariadb don't accept localhost
DATABASE_OPTIONS: "--health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 3"
PHP_VERSION: ${{ matrix.php }}
LARAVEL_VERSION: ${{ matrix.laravel }}
DEPENDENCY_VERSION: ${{ matrix.dependency-version }}
# TEST_COMMANDS: vendor/bin/phpunit -c phpunit-ci.xml.dist
# LINUX_PACKAGES: imagemagick jpegoptim optipng pngquant gifsicle webp ffmpeg
# BREW_FORMULAS: ghostscript jpegoptim optipng pngquant gifsicle webp ffmpeg mariadb
6 changes: 3 additions & 3 deletions examples/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ jobs:
strategy:
fail-fast: true
matrix:
php: [ 8.2, 8.3 ]
laravel: [ 11.* ]
php: [ 8.4, 8.5 ]
laravel: [ 13.* ]
dependency-version: [ prefer-stable ]
with:
DATABASE_NAME: myproject_test
PHP_VERSION: ${{ matrix.php }}
LARAVEL_VERSION: ${{ matrix.laravel }}
DEPENDENCY_VERSION: ${{ matrix.dependency-version }}
# TEST_COMMANDS: vendor/bin/phpunit -c phpunit-ci.xml.dist
# LINUX_PACKAGES: imagemagick jpegoptim optipng pngquant gifsicle webp ffmpeg
# BREW_FORMULAS: ghostscript jpegoptim optipng pngquant gifsicle webp ffmpeg mariadb