feat(frontend|backend): The Shop (#103) #229
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: "PHP CI" | |
on: | |
push: | |
branches: | |
- 'main' | |
pull_request: | |
branches: | |
- '*' | |
permissions: | |
contents: read | |
jobs: | |
php-ci: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:14 | |
env: | |
POSTGRES_DB: gib_potato_test | |
POSTGRES_USER: gib_potato | |
POSTGRES_PASSWORD: password | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 3s | |
--health-timeout 1s | |
--health-retries 5 | |
ports: | |
- 5432:5432 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.1' | |
extensions: mbstring, intl | |
- name: Run composer install | |
run: composer update --no-progress | |
- name: Run PHP CodeSniffer | |
run: vendor/bin/phpcs --colors -p src/ tests/ | |
- name: Run PHPStan | |
run: vendor/bin/phpstan analyse | |
- name: Run PHPUnit | |
run: | | |
export CODECOVERAGE=1 | |
vendor/bin/phpunit --verbose --colors=always --coverage-clover=coverage.xml | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 |