Skip to content

Commit

Permalink
Merge pull request #291 from sergiy-petrov/php-8.3
Browse files Browse the repository at this point in the history
Add Github Actions
  • Loading branch information
imanghafoori1 authored Oct 9, 2023
2 parents c4148ec + 04437b5 commit f7dc4a2
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 23 deletions.
74 changes: 74 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Tests

on:
push:
pull_request:

jobs:
tests:
strategy:
fail-fast: true
matrix:
php: ["7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"]
laravel: ["^6.0", "^7.0", "^8.0", "^9.0", "^10.0"]
exclude:
- php: "8.0"
laravel: "^10.0"
- php: "7.4"
laravel: "^10.0"
- php: "7.3"
laravel: "^10.0"
- php: "7.2"
laravel: "^10.0"
- php: "7.4"
laravel: "^9.0"
- php: "7.3"
laravel: "^9.0"
- php: "7.2"
laravel: "^9.0"
- php: "8.3"
laravel: "^8.0"
- php: "8.2"
laravel: "^8.0"
- php: "7.2"
laravel: "^8.0"
- php: "8.3"
laravel: "^7.0"
- php: "8.2"
laravel: "^7.0"
- php: "8.1"
laravel: "^7.0"
- php: "8.3"
laravel: "^6.0"
- php: "8.2"
laravel: "^6.0"
- php: "8.1"
laravel: "^6.0"

name: "PHP${{ matrix.php }} - Laravel${{ matrix.laravel }}"

runs-on: "ubuntu-latest"

steps:
- name: "Checkout code"
uses: "actions/checkout@v3"

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

- name: "Check Composer configuration"
run: "composer validate --strict"

- name: "Install dependencies from composer.json"
run: "composer update --with='laravel/framework:${{ matrix.laravel }}' --no-interaction --no-progress"

- name: "Check PSR-4 mapping"
run: "composer dump-autoload --optimize --strict-psr"

- name: "Execute unit tests"
run: "vendor/bin/phpunit --coverage-clover=coverage.xml --log-junit=test-report.xml --testdox"
18 changes: 0 additions & 18 deletions .travis.yml

This file was deleted.

8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
}
],
"require": {
"php": ">=5.4.0",
"illuminate/support": "4.2.*|5.*|^6.0|^7.0|^8.0|^9.0|^10.0"
"php": "^7.2|^8.0",
"illuminate/support": "^6.0|^7.0|^8.0|^9.0|^10.0"
},
"require-dev": {
"phpunit/phpunit": "^7|^9.5.10",
"orchestra/testbench": "3.7.*|^7.0"
"phpunit/phpunit": "^7||^8.4|^9.3.3",
"orchestra/testbench": "^4.0|^5.0|^6.0|^7.0|^8.0"
},
"autoload": {
"classmap": [
Expand Down
2 changes: 1 addition & 1 deletion tests/LaravelLogViewerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
class LaravelLogViewerTest extends OrchestraTestCase
{

public function setUp()
public function setUp(): void
{
parent::setUp();
config()->set('app.key', 'XP0aw2Dkrk22p0JoAOzulOl8XkUxlvkO');
Expand Down

0 comments on commit f7dc4a2

Please sign in to comment.