#231 - add new tab to the menu - “Raporty benefitowe” #697
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 stuff | |
on: | |
pull_request: | |
branches: | |
- main | |
types: | |
- opened | |
- synchronize | |
- reopened | |
- ready_for_review | |
paths: | |
- '**.php' | |
- 'composer.json' | |
- 'composer.lock' | |
- 'phpunit.xml' | |
- 'env.ci' | |
jobs: | |
test-and-lint-php: | |
name: Test & lint PHP stuff | |
timeout-minutes: 10 | |
if: github.event.pull_request.draft == false | |
runs-on: ubuntu-22.04 | |
services: | |
pgsql: | |
image: postgres:15 | |
env: | |
POSTGRES_DB: toby | |
POSTGRES_USER: toby | |
POSTGRES_PASSWORD: password | |
PGPASSWORD: password | |
ports: | |
- 5432:5432 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Validate composer.json and composer.lock | |
run: composer validate | |
- name: Cache dependencies | |
uses: actions/cache@v3 | |
with: | |
path: vendor | |
key: ${{ runner.os }}-composer-dependencies-${{ hashFiles('composer.lock') }} | |
restore-keys: ${{ runner.os }}-composer-dependencies | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.2 | |
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, pdo_pgsql, intl, gd | |
coverage: none | |
- name: Install Composer dependencies | |
run: composer install --prefer-dist --no-interaction --no-suggest | |
- name: Run PHP linter | |
run: composer cs | |
- name: Execute tests | |
run: php artisan test --env=ci |