Skip to content

Commit

Permalink
new run tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cannycookie committed Jul 10, 2023
1 parent d2e02fc commit e26ba9e
Showing 1 changed file with 37 additions and 34 deletions.
71 changes: 37 additions & 34 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -1,45 +1,48 @@
name: run-tests

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

jobs:
ci:
tests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
fail-fast: false
matrix:
os: [ubuntu-latest]
php: [8.1, 8.2]
laravel: [10.*]
php: [8.2, 8.1, 8.0]
laravel: [10.*, 9.*]
dependency-version: [prefer-lowest, prefer-stable]
include:
- laravel: 10.*
testbench: 8.*
- laravel: 9.*
testbench: 7.*
exclude:
- laravel: 10.*
php: 8.0

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

- name: Checkout
uses: actions/checkout@v2

- name: Cache dependencies
uses: actions/cache@v1
with:
path: ~/.composer/cache/files
key: dependencies-php-${{ matrix.php }}-L${{ matrix.laravel }}-${{ matrix.dependency-version }}-composer-${{ hashFiles('composer.json') }}

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, mbstring, zip
coverage: none

- name: Require Laravel Version
run: >
composer require
"laravel/framework:${{ matrix.laravel }}"
--no-interaction --no-update
- name: Install Composer dependencies
run: composer update --${{ matrix.dependency-version }} --no-interaction --prefer-dist

- name: Integration Tests
run: php ./vendor/bin/pest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: curl, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, iconv
coverage: none

- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "nesbot/carbon:>=2.62.1" --no-interaction --no-update
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction
- name: Setup Problem Matches
run: |
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Execute tests
run: vendor/bin/pest

0 comments on commit e26ba9e

Please sign in to comment.