Skip to content

Updated links to docs #9

Updated links to docs

Updated links to docs #9

Workflow file for this run

name: build and test
on: [push, pull_request, workflow_dispatch]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
version: ['7.0', '7.4', '8.0', '8.2']
max-parallel: 2
steps:
- uses: actions/checkout@v3
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: php-${{ matrix.version }}-${{ github.ref }}
- name: Setup PHP
id: setup-php
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.version }}
coverage: none
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies
run: composer install --prefer-dist --no-progress
test:
needs: build
runs-on: ubuntu-latest
strategy:
matrix:
version: ['7.0', '7.4', '8.0', '8.2']
max-parallel: 1
steps:
- uses: actions/checkout@v3
- name: Setup PHP
id: setup-php
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.version }}
coverage: xdebug2
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: php-${{ matrix.version }}-${{ github.ref }}
- name: Run test suite
run: php vendor/bin/phpunit --coverage-clover=coverage.xml --whitelist=./src ./tests
- name: Archive code coverage results
uses: actions/upload-artifact@v3
with:
name: code-coverage-report
path: coverage.xml
retention-days: 1
coverage_upload:
needs: test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Download code coverage results
uses: actions/download-artifact@v3
with:
name: code-coverage-report
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
files: ./coverage.xml
verbose: true