diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b398057..3b7e21a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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 @@ -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 @@ -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 @@ -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') }} diff --git a/examples/tests-multiple-db-images.yml b/examples/tests-multiple-db-images.yml index 3d5f1e2..6143b71 100644 --- a/examples/tests-multiple-db-images.yml +++ b/examples/tests-multiple-db-images.yml @@ -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 diff --git a/examples/tests.yml b/examples/tests.yml index 52ee03e..1f5dbc8 100644 --- a/examples/tests.yml +++ b/examples/tests.yml @@ -16,8 +16,8 @@ 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 @@ -25,4 +25,4 @@ jobs: 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