Skip to content

Commit

Permalink
Merge pull request #182 from dystcz/feature/update-testing-workflow
Browse files Browse the repository at this point in the history
Update testing workflow
  • Loading branch information
repl6669 authored Oct 1, 2024
2 parents a590883 + 3f70c76 commit ff2a90a
Showing 1 changed file with 18 additions and 17 deletions.
35 changes: 18 additions & 17 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,36 +9,33 @@ jobs:
strategy:
matrix:
php: [8.2, 8.3]
laravel: [11]
laravel: [11.*]
steps:
- name: Checkout Code
uses: actions/checkout@v3
uses: actions/checkout@v4

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

- name: Cache dependencies
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: composer-p${{ matrix.php }}-l${{ matrix.laravel }}-${{ hashFiles('composer.json') }}
restore-keys: composer-p${{ matrix.php }}-l${{ matrix.laravel }}-

- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, gd, redis, bcmath
extensions: pdo, sqlite, pdo_sqlite
tools: composer:v2
coverage: none
ini-values: error_reporting=E_ALL
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Set Laravel Version
run: composer require "laravel/framework:^${{ matrix.laravel }}" --no-update

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

- name: Cache composer dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
restore-keys: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-

- name: Install dependencies
uses: nick-fields/retry@v2
with:
Expand All @@ -47,6 +44,10 @@ jobs:
command: composer update --prefer-dist --no-interaction --no-progress

- name: Execute tests
env:
APP_ENV: testing
DB_CONNECTION: testing
DB_DATABASE: ":memory:"
run: composer test

# - name: Execute tests with hashids turned on
Expand Down

0 comments on commit ff2a90a

Please sign in to comment.