Skip to content

Activate Workflows #106

Activate Workflows

Activate Workflows #106

Workflow file for this run

name: Tests
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
permissions:
contents: read
jobs:
tests:
name: PHPUnit with PHP ${{ matrix.php-version }} ${{ matrix.dependencies }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- php-version: "8.1"
dependencies: "lowest"
- php-version: "8.1"
dependencies: "highest"
- php-version: "8.2"
dependencies: "highest"
- php-version: "8.3"
dependencies: "highest"
steps:
- name: Git Checkout
uses: actions/checkout@v4
- name: PHP Setup
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
- name: Install dependencies
uses: ramsey/composer-install@v3
with:
dependency-versions: ${{ matrix.dependencies }}
- name: Execute tests
run: composer tests:coverage:gitlab-ci
- name: Upload coverage report
uses: actions/upload-artifact@v2
with:
name: coverage-report
path: .coverage
- name: Generate coverage badge
run: |
npx cobertura-badger .coverage/cobertura.xml -o .coverage/cobertura-coverage.svg
npx lcov-badge coverage/lcov.info --output coverage/coverage.svg
- name: Upload coverage badge
uses: actions/upload-artifact@v2
with:
name: coverage-badge
path: coverage/coverage.svg