Skip to content

Build

Build #100

Workflow file for this run

name: Build
on:
schedule:
- cron: '0 0 1 * 0'
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
build:
strategy:
matrix:
php: ['5.6', '7.3', '7.4', '8.0', '8.1']
runs-on: ubuntu-latest
steps:
- name: Set up PHP environment
uses: shivammathur/setup-php@v2
with:
php-version: '${{ matrix.php }}'
tools: composer
extensions: 'xdebug'
- uses: actions/checkout@v2
- name: Install Composer dependencies & cache dependencies
uses: "ramsey/composer-install@v2"
with:
composer-options: "--prefer-dist"
custom-cache-key: "{{ runner.os }}-composer-${{ matrix.php }}"
env:
COMPOSER_ROOT_VERSION: dev-${{ github.event.repository.default_branch }}
- name: Validate composer.json and composer.lock
#run: composer validate --strict # Currently we’re installing mf2/tests from a commit ref.
run: composer validate
- name: Run Test Suite
run: XDEBUG_MODE=coverage ./vendor/bin/phpunit tests --coverage-text
- name: Run Code Sniffer
run: ./vendor/bin/phpcs
#- name: Run Static Analysis
# run: ./vendor/bin/psalm