Skip to content

Tests & Style Checks #541

Tests & Style Checks

Tests & Style Checks #541

Workflow file for this run

name: Tests & Style Checks
on:
# Trigger on any PR being opened
pull_request:
# Or weekly and on a merge to master (to update the badge)
push:
branches:
- master
schedule:
- cron: 0 0 * * 0
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: "ramsey/composer-install@v2"
- name: Check style
run: composer lint
test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
php:
- "8.1"
- "latest"
steps:
- uses: "actions/checkout@v3"
- uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php }}"
- uses: "ramsey/composer-install@v2"
with:
dependency-versions: "${{ matrix.dependencies }}"
composer-options: "${{ matrix.composer-options }}"
- name: Run tests
run: composer test
coverage:
name: Code Coverage
runs-on: ubuntu-latest
steps:
- uses: "actions/checkout@v3"
- uses: "shivammathur/setup-php@v2"
with:
php-version: latest
coverage: xdebug
- uses: "ramsey/composer-install@v2"
- uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: "${{ secrets.CC_TEST_REPORTER_ID }}"
with:
coverageCommand: composer test