Skip to content

Commit

Permalink
- Fix github test cases.
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdullahFaqeir committed May 7, 2024
1 parent e19e6d2 commit 608d193
Showing 1 changed file with 46 additions and 41 deletions.
87 changes: 46 additions & 41 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,56 +3,61 @@ on:
push:
pull_request:
schedule:
- cron: '0 0 * * *'
- cron: '0 0 * * *'

jobs:
run-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [8.2]
laravel: [10.*,11.*]
dependency-version: [prefer-lowest, prefer-stable]
php: [ 8.2 ]
laravel: [ 10.*,11.* ]
dependency-version: [ prefer-lowest, prefer-stable ]
include:
- laravel: 10.*
testbench: 8.*
laravel-medialibrary: 11.*
- laravel: 10.*
testbench: 8.*
laravel-medialibrary: 11.*

- laravel: 11.*
testbench: 9.*
laravel-medialibrary: 11.*


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

steps:
- name: Update apt
run: sudo apt-get update --fix-missing

- name: Install ffmpeg
run: sudo apt-get install ffmpeg

- 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 Matches
run: |
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Fix Imagick Policy
run: sudo sed -i 's/none/read|write/g' /etc/ImageMagick-6/policy.xml

- 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 --no-suggest
- name: Execute tests
run: vendor/bin/phpunit
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
AWS_BUCKET: ${{ secrets.AWS_BUCKET }}
- name: Update apt
run: sudo apt-get update --fix-missing

- name: Install ffmpeg
run: sudo apt-get install ffmpeg

- 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 Matches
run: |
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Fix Imagick Policy
run: sudo sed -i 's/none/read|write/g' /etc/ImageMagick-6/policy.xml

- 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 --no-suggest
- name: Execute tests
run: vendor/bin/phpunit
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
AWS_BUCKET: ${{ secrets.AWS_BUCKET }}

0 comments on commit 608d193

Please sign in to comment.