Merge pull request #7 from TemirkhanN/main #4
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: CI | |
on: [ push ] | |
jobs: | |
qa: | |
runs-on: ubuntu-20.04 | |
env: | |
DB_HOST: 127.0.0.1 | |
DB_NAME: eloth_test | |
DB_USER: root | |
DB_PASS: some_pass | |
services: | |
mysql: | |
image: mysql:8.0 | |
env: | |
MYSQL_DATABASE: eloth_test | |
MYSQL_ROOT_PASSWORD: some_pass | |
ports: | |
- 3306:3306 | |
# Before continuing, verify the mysql container is reachable from the ubuntu host | |
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.2' | |
extensions: xdebug | |
- name: install vendors | |
run: composer install --no-interaction | |
- name: install project | |
run: php install.php | |
- name: codestyle | |
run: ./vendor/bin/phpcs | |
- name: static analyze | |
run: ./vendor/bin/phpstan | |
- name: tests | |
run: php -dxdebug.mode=coverage ./vendor/bin/phpunit --coverage-text |