Skip to content

Commit

Permalink
Fixed GitHub Actions 🎉 (#48)
Browse files Browse the repository at this point in the history
* Fetch more than the latest commit from the repository
* Include the latest Laravel version
* Made the GitHub Action run on different supported by Laravel PHP versions
* Made the tests run every day at 8am
* Renamed tests to be more easily scannable
  • Loading branch information
DCzajkowski authored Feb 10, 2020
1 parent 7882f42 commit c991d2d
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/actions/common/setup
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ commit="tmp-$(git rev-parse --verify HEAD)"
git checkout -b $commit

# Create Laravel project
composer create-project --prefer-dist laravel/laravel test-app 6.4
composer create-project --prefer-dist laravel/laravel test-app '6.*'
cd test-app

# Require Laravel auth preset and setup views
Expand Down
30 changes: 26 additions & 4 deletions .github/workflows/run-tests-on-laravel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,26 @@ on:
pull_request:
branches:
- master
schedule:
- cron: '0 8 * * *'

jobs:
test_without_email_verification:
name: 'Runs tests without email verification module on latest Laravel'
name: (PHP ${{ matrix.php }}, Laravel 6) Tests without email verification
runs-on: ubuntu-latest
strategy:
matrix:
php: ['7.2', '7.3', '7.4']

steps:
- uses: actions/checkout@master
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Installs PHP version ${{ matrix.php }}
uses: shivammathur/setup-php@v1
with:
php-version: ${{ matrix.php }}

- name: 'Verifies environment'
run: |
Expand All @@ -25,11 +37,21 @@ jobs:
run: ( cd test-app && ./vendor/bin/phpunit )

test_with_email_verification:
name: 'Runs tests with email verification module on latest Laravel'
name: (PHP ${{ matrix.php }}, Laravel 6) Tests with email verification
runs-on: ubuntu-latest
strategy:
matrix:
php: ['7.2', '7.3', '7.4']

steps:
- uses: actions/checkout@master
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Installs PHP version ${{ matrix.php }}
uses: shivammathur/setup-php@v1
with:
php-version: ${{ matrix.php }}

- name: 'Verifies environment'
run: |
Expand Down

0 comments on commit c991d2d

Please sign in to comment.