bugfix/default #46
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
permissions: | |
contents: write | |
jobs: | |
php81: | |
runs-on: ubuntu-latest | |
services: | |
docker: | |
image: docker:20.10.7 | |
options: --privileged | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Validate composer.json and composer.lock | |
run: composer validate --strict | |
- name: Cache Composer packages | |
id: composer-cache | |
uses: actions/cache@v4 | |
with: | |
path: vendor | |
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} | |
restore-keys: | | |
${{ runner.os }}-php- | |
- name: Install Composer dependencies | |
run: docker compose run --rm php81composer composer install --prefer-dist --no-progress --no-suggest | |
- name: Run tests with coverage | |
run: docker compose run --rm php81 vendor/bin/phpunit --coverage-text --coverage-clover=coverage.xml | |
- name: Check coverage threshold | |
run: | | |
grep "<metrics" coverage.xml | grep 'line-rate="1.000"' | |
continue-on-error: false | |
php82: | |
runs-on: ubuntu-latest | |
services: | |
docker: | |
image: docker:20.10.7 | |
options: --privileged | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Validate composer.json and composer.lock | |
run: composer validate --strict | |
- name: Cache Composer packages | |
id: composer-cache | |
uses: actions/cache@v4 | |
with: | |
path: vendor | |
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} | |
restore-keys: | | |
${{ runner.os }}-php- | |
- name: Install Composer dependencies | |
run: docker compose run --rm php82composer composer install --prefer-dist --no-progress --no-suggest | |
- name: Run tests with coverage | |
run: docker compose run --rm php82 vendor/bin/phpunit --coverage-text --coverage-clover=coverage.xml | |
- name: Check coverage threshold | |
run: | | |
grep "<metrics" coverage.xml | grep 'line-rate="1.000"' | |
continue-on-error: false | |
php83: | |
runs-on: ubuntu-latest | |
services: | |
docker: | |
image: docker:20.10.7 | |
options: --privileged | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Validate composer.json and composer.lock | |
run: composer validate --strict | |
- name: Cache Composer packages | |
id: composer-cache | |
uses: actions/cache@v4 | |
with: | |
path: vendor | |
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} | |
restore-keys: | | |
${{ runner.os }}-php- | |
- name: Install Composer dependencies | |
run: docker compose run --rm php83composer composer install --prefer-dist --no-progress --no-suggest | |
- name: Run tests with coverage | |
run: docker compose run --rm php83 vendor/bin/phpunit --coverage-text --coverage-clover=coverage.xml | |
- name: Check coverage threshold | |
run: | | |
grep "<metrics" coverage.xml | grep 'line-rate="1.000"' | |
continue-on-error: false |