Skip to content

Commit

Permalink
Setup github actions.
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <[email protected]>
  • Loading branch information
crynobone committed Sep 4, 2020
1 parent e482f1b commit c6ee5e0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 47 deletions.
48 changes: 3 additions & 45 deletions .github/workflows/laravel-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,42 +7,6 @@ on:
- cron: '0 0 * * *'

jobs:
tests-on-php71:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [7.1]
laravel: [5.8, 5.7, 5.6, 5.5]

name: PHP${{ matrix.php }} with Laravel ${{ matrix.laravel }}

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

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

- 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
coverage: none

- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update
composer update --prefer-dist --no-interaction --no-suggest
- name: Execute tests
run: vendor/bin/phpunit --exclude-group=redis-auth
env:
REDIS_HOST: redis

tests-on-php72:
runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -75,9 +39,7 @@ jobs:
composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update
composer update --prefer-dist --no-interaction --no-suggest
- name: Execute tests
run: vendor/bin/phpunit --exclude-group=redis-auth
env:
REDIS_HOST: redis
run: vendor/bin/phpunit


tests-on-php73:
Expand Down Expand Up @@ -112,9 +74,7 @@ jobs:
composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update
composer update --prefer-dist --no-interaction --no-suggest
- name: Execute tests
run: vendor/bin/phpunit --exclude-group=redis-auth
env:
REDIS_HOST: redis
run: vendor/bin/phpunit

tests-on-php74:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -148,6 +108,4 @@ jobs:
composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update
composer update --prefer-dist --no-interaction --no-suggest
- name: Execute tests
run: vendor/bin/phpunit --exclude-group=redis-auth
env:
REDIS_HOST: redis
run: vendor/bin/phpunit
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
"thecodingmachine/discovery": "^1.2"
},
"require-dev": {
"orchestra/testbench": "^3.6|^3.7|^3.8|^4.0|^5.0",
"phpunit/phpunit": "^7.0|^8.0|^9.0",
"orchestra/testbench": "^3.5 || ^4.0 || ^5.0",
"mockery/mockery": "^1.0"
},
"autoload": {
Expand Down

0 comments on commit c6ee5e0

Please sign in to comment.