This repository has been archived by the owner on Apr 28, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Showing
2 changed files
with
54 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,50 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: [master, develop] | ||
pull_request: | ||
branches: [master, develop] | ||
|
||
jobs: | ||
PHPUnit: | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php_versions: ['7.1', '7.2', '7.3', '7.4'] | ||
laravel: ['5.8.*'] | ||
|
||
name: PHPUnit Tests - ${{ matrix.php_versions }} - ${{ matrix.laravel }} | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup PHP, with composer and extensions | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php_versions }} | ||
extensions: mbstring, dom, fileinfo, gd | ||
coverage: xdebug | ||
tools: pecl | ||
- name: Set Laravel version | ||
run: composer require "illuminate/redis:${{ matrix.laravel }}" --no-update | ||
- name: Install Dependencies | ||
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist | ||
- name: Execute tests (Unit and Feature tests) via PHPUnit & MySQL Env | ||
if: ${{ matrix.database == 'mysql' }} | ||
env: | ||
DB_CONNECTION: mysql | ||
DB_HOST: 127.0.0.1 | ||
DB_USER: laravel | ||
DB_PASSWORD: password | ||
DB_DATABASE: laravel | ||
DB_PORT: 3306 | ||
run: vendor/bin/phpunit | ||
- name: Execute tests via PHPUnit | ||
run: vendor/bin/phpunit | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
file: ./_meta/coverage.xml | ||
fail_ci_if_error: true |
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