Skip to content

Fix config root name #18

Fix config root name

Fix config root name #18

Workflow file for this run

on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- php: '8.0'
output: '-o github-action -o default'
phpcq_install: 'update'
composer_install: 'update --prefer-dist --no-interaction --prefer-lowest'
- php: '8.1'
output: '-o default'
phpcq_install: 'update'
composer_install: 'update --prefer-dist --no-interaction'
steps:
- name: PHP ${{ matrix.php }} Pull source
uses: actions/checkout@v4
with:
fetch-depth: 0
# see https://github.com/shivammathur/setup-php
- name: PHP ${{ matrix.php }} Setup PHP.
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
- name: PHP ${{ matrix.php }} Cache composer cache directory
uses: actions/cache@v3
env:
cache-name: composer-cache-dir
with:
path: ~/.cache/composer
key: ${{ runner.os }}-build-${{ env.cache-name }}
- name: PHP ${{ matrix.php }} Cache vendor directory
uses: actions/cache@v3
env:
cache-name: composer-vendor
with:
path: vendor
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
- name: PHP ${{ matrix.php }} Install composer dependencies
run: composer ${{ matrix.composer_install }}
- name: Install phpcq toolchain
run: ./vendor/bin/phpcq ${{ matrix.phpcq_install }} -v
- name: PHP ${{ matrix.php }} Run tests
run: ./vendor/bin/phpcq run -v ${{ matrix.output }}
- name: PHP ${{ matrix.php }} Upload build artifacts
uses: actions/upload-artifact@v3
if: ${{ success() }} || ${{ failure() }}
with:
name: phpcq-builds-php-${{ matrix.php }}
path: .phpcq/build/