Skip to content

ci: github actions

ci: github actions #4

Workflow file for this run

name: Tests
on:
push:
branches: [ $default-branch ]
pull_request: ~
permissions:
contents: read
jobs:
phpunit:
strategy:
matrix:
include:
- php: '7.1'
- php: '7.2'
- php: '7.3'
- php: '7.4'
fail-fast: false

Check failure on line 20 in .github/workflows/github-actions.yml

View workflow run for this annotation

GitHub Actions / Tests

Invalid workflow file

The workflow is not valid. .github/workflows/github-actions.yml (Line: 20, Col: 20): Unexpected value 'false'
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php }}"
tools: phpunit
- name: Validate composer.json and composer.lock
run: composer validate --strict
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-${{ matrix.php }}
- name: Install global packages
run: composer global require satooshi/php-coveralls:@stable phpunit/phpunit:@stable --no-update
- name: Install dependencies
run: composer install --prefer-dist --no-progress
# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
# Docs: https://getcomposer.org/doc/articles/scripts.md
- name: Run test suite
run: phpunit -c phpunit.xml.dist --coverage-clover build/logs/clover.xml