toby/.github/workflows/test-and-lint-php.yml
Adrian Hopek af6f747aa2
#48 - deployment (#68)
* #48 - postgreSQL db

* #43 - vacation summary for employee (#66)

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* #5 - bump dependencies

* #43 - wip

* #43 - add composer script

* #43 - fix

* #43 - fix

* #43 - wip

* #43 - ecs fix

* #43 - cr fix

* #43 - cr fix

* #43 - fix

Co-authored-by: EwelinaLasowy <ewelina.lasowy@blumilk.pl>

* #48 - redis stuff

* #48 - user avatars using ui-avatars.com

* #48 - fix

* #48 - fix

* Apply suggestions from code review

Co-authored-by: Marcin Tracz <marcin.tracz@blumilk.pl>

* #48 - cr fix

Co-authored-by: EwelinaLasowy <ewelina.lasowy@blumilk.pl>
Co-authored-by: Marcin Tracz <marcin.tracz@blumilk.pl>
2022-03-04 14:47:45 +01:00

52 lines
1.2 KiB
YAML

name: Test & lint PHP stuff
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
test-and-lint-php:
name: Test & lint PHP stuff
runs-on: ubuntu-20.04
services:
pgsql:
image: postgres:13
env:
POSTGRES_DB: toby
POSTGRES_USER: toby
POSTGRES_PASSWORD: password
PGPASSWORD: password
ports:
- 5432:5432
steps:
- uses: actions/checkout@v2
- name: Validate composer.json and composer.lock
run: composer validate
- name: Cache dependencies
uses: actions/cache@v2
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.1
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, intl
coverage: none
- name: Install Composer dependencies
run: composer install --prefer-dist --no-interaction --no-suggest
- name: Run PHP linter
run: composer ecs
- name: Execute tests
run: php artisan test --env=ci