diff --git a/.github/workflows/build-ci.yml b/.github/workflows/build-ci.yml index d0a91b753..0c707b9dd 100644 --- a/.github/workflows/build-ci.yml +++ b/.github/workflows/build-ci.yml @@ -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