Commit 03de87dc authored by Smolevich's avatar Smolevich

Refactor build-ci.yml

parent 811cb3d0
......@@ -8,10 +8,11 @@ on:
jobs:
build:
runs-on: ubuntu-latest
runs-on: ${{matrix.os}}
strategy:
matrix:
php: [7.1, 7.2, 7.3]
php: [7.1, 7.2, 7.3, 7.4]
os: ['ubuntu-latest']
services:
mongo:
image: mongo
......@@ -25,18 +26,25 @@ jobs:
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
MYSQL_DATABASE: 'unittest'
MYSQL_ROOT_PASSWORD:
name: PHP ${{ matrix.php }} Test ${{ matrix.env }}
steps:
- uses: actions/checkout@v1
- name: Show php version
run: php${{ matrix.php }} -v && composer -V
- name: Show docker and docker-compose versions
run: |
docker version
- name: Debug if needed
run: if [[ "$DEBUG" == "true" ]]; then env; fi
run: if [[ "$DEBUG" == "true" ]]; then docker version && env; fi
env:
DEBUG: ${{secrets.DEBUG}}
- name: Get Composer Cache Directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache dependencies
uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ matrix.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ matrix.os }}-composer-
- name: Install dependencies
run: |
composer install --no-interaction
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment