github actions

This commit is contained in:
denisdulici 2019-12-04 18:39:02 +03:00
parent b8018dd804
commit d4f390a348

View File

@ -5,30 +5,36 @@ on: [push, pull_request]
jobs: jobs:
tests: tests:
name: PHP ${{ matrix.php-versions }} Test name: PHP ${{ matrix.php }} Test
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
max-parallel: 2
matrix: matrix:
php-versions: ['7.2', '7.3', '7.4'] php: ['7.2', '7.3', '7.4']
steps: steps:
- uses: actions/checkout@v1 - name: Checkout code
uses: actions/checkout@v1
- name: Setup PHP - name: Cache composer
uses: shivammathur/setup-php@master uses: actions/cache@v1
with: with:
php-version: ${{ matrix.php-versions }} path: ~/.composer/cache/files
extension-csv: bcmath, ctype, dom, fileinfo, gd, json, mbstring, openssl, xml, zip key: php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
coverage: none
- name: Copy .env - name: Setup PHP
run: cp .env.testing .env uses: shivammathur/setup-php@v1
with:
php-version: ${{ matrix.php }}
extension-csv: bcmath, ctype, dom, fileinfo, gd, json, mbstring, pdo, pdo_sqlite, openssl, sqlite, xml, zip
coverage: none
- name: Install composer - name: Copy .env
run: composer test run: cp .env.testing .env
- name: Execute tests - name: Install composer
run: vendor/bin/phpunit run: composer test
- name: Execute tests
run: vendor/bin/phpunit