-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b4daeaf
commit 8b938b7
Showing
2 changed files
with
99 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Check Imports | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Validate composer.json and composer.lock | ||
run: composer validate --strict | ||
|
||
- name: Cache Composer packages | ||
id: composer-cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: vendor | ||
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-php- | ||
- name: Install dependencies | ||
run: composer install --prefer-dist --no-progress | ||
|
||
- name: Check Imports | ||
run: composer run-script imports |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: tests | ||
|
||
# Controls when the workflow will run | ||
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
branches: [master] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
test: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
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: 7.2 | ||
laravel: ^8.0 | ||
- php: 7.2 | ||
laravel: ^9.0 | ||
- php: 7.2 | ||
laravel: ^10.0 | ||
- php: 7.3 | ||
laravel: ^9.0 | ||
- php: 7.3 | ||
laravel: ^10.0 | ||
- php: 7.4 | ||
laravel: ^9.0 | ||
- php: 7.4 | ||
laravel: ^10.0 | ||
- php: 8.0 | ||
laravel: ^10.0 | ||
- php: 8.1 | ||
laravel: ^6.0 | ||
- php: 8.1 | ||
laravel: ^7.0 | ||
|
||
name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
extensions: mbstring, exif, iconv, tokenizer | ||
coverage: none | ||
|
||
- name: Install dependencies | ||
run: | | ||
composer require "laravel/framework=${{ matrix.laravel }}" --no-update | ||
composer update --prefer-dist --no-interaction --no-progress | ||
- name: Execute tests | ||
run: vendor/bin/phpunit --verbose |