#82 - add community standards files #161
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: Test & lint PHP codebase | |
on: | |
pull_request: | |
branches: [ "main" ] | |
types: [opened, synchronize, reopened, ready_for_review] | |
paths: | |
- '**.php' | |
- 'composer.json' | |
- 'composer.lock' | |
jobs: | |
test-and-lint-php: | |
name: Test & lint PHP codebase | |
timeout-minutes: 10 | |
if: github.event.pull_request.draft == false | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] # https://github.com/actions/checkout | |
- name: Cache dependencies | |
uses: actions/[email protected] # https://github.com/actions/cache | |
with: | |
path: vendor | |
key: ${{ runner.os }}-composer-dependencies-${{ hashFiles('composer.lock') }} | |
restore-keys: ${{ runner.os }}-composer-dependencies | |
- name: Setup PHP | |
uses: shivammathur/[email protected] # https://github.com/shivammathur/setup-php | |
with: | |
php-version: 8.3 | |
coverage: none | |
- name: Install Composer dependencies | |
run: composer install --prefer-dist --no-interaction | |
- name: Run PHP linter | |
run: composer cs | |
- name: Run tests | |
run: composer test |