Skip to content

Commit

Permalink
Update run-tests.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
iamfarhad authored May 12, 2024
1 parent aeaa946 commit 0986d7d
Showing 1 changed file with 37 additions and 29 deletions.
66 changes: 37 additions & 29 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,52 @@
name: run-tests
name: Tests

on: [push, pull_request]
on:
push:
pull_request:

jobs:
test:
runs-on: ${{ matrix.os }}
run:
runs-on: 'ubuntu-latest'
strategy:
fail-fast: true
fail-fast: false
matrix:
php: ['8.2','8.3']
php: ['8.1', '8.2','8.3']
os: [ubuntu-latest]
stability: [prefer-stable]
laravel: [10.*, 11.*]
laravel: [9.*, 10.*, 11.*]
include:
- laravel: 9.*
testbench: 7.*
- laravel: 10.*
testbench: 7.*
- laravel: 11.*
testbench: 7.*


name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
coverage: none

- name: Setup problem matchers
run: |
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction
- name: Execute tests
run: vendor/bin/phpunit
- name: Checkout code
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: bcmath, curl, dom, mbstring, pcntl, sockets, xml, intl
coverage: none

- name: Set up Docker
run: |
sudo rm /usr/local/bin/docker-compose
curl -SL https://github.com/docker/compose/releases/download/v2.15.1/docker-compose-`uname -s`-`uname -m` > docker-compose
chmod +x docker-compose
sudo mv docker-compose /usr/local/bin
- name: Start Docker container
run: docker-compose up -d

- name: Install dependencies
run: |
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
- name: Execute tests
run: vendor/bin/phpunit

0 comments on commit 0986d7d

Please sign in to comment.