mirror of
https://github.com/kevin-DL/LaravelShoppingcart.git
synced 2026-01-12 02:55:13 +00:00
47 lines
1.2 KiB
YAML
47 lines
1.2 KiB
YAML
name: Code Checks
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
pull_request:
|
|
branches: [ master ]
|
|
|
|
jobs:
|
|
run:
|
|
runs-on: ubuntu-18.04
|
|
strategy:
|
|
matrix:
|
|
php-versions: ['7.1', '7.2']
|
|
name: PHP ${{ matrix.php-versions }}
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setup PHP
|
|
uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: ${{ matrix.php-versions }}
|
|
env:
|
|
runner: ubuntu-18.04
|
|
|
|
- name: Validate composer.json and composer.lock
|
|
run: composer validate
|
|
|
|
- name: Get composer cache directory
|
|
id: composercache
|
|
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
|
|
|
- name: Cache Composer packages
|
|
id: composer-cache
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: ${{ steps.composercache.outputs.dir }}
|
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
|
restore-keys: ${{ runner.os }}-composer-
|
|
|
|
- name: Install composer packages
|
|
run: composer install --prefer-dist --no-interaction
|
|
|
|
- name: Tests Coverage
|
|
run: vendor/bin/phpunit --coverage-clover=coverage.xml
|