fix(insured person): Не удаляется застрахованное лицо, если оказанных… #5
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: tests | |
on: | |
- push | |
- pull_request | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:15.5 | |
env: | |
POSTGRES_USER: ${{ secrets.DB_USERNAME }} | |
POSTGRES_PASSWORD: ${{ secrets.DB_PASSWORD }} | |
POSTGRES_DB: ${{ secrets.DB_TEST_DATABASE }} | |
ports: | |
- 5432:5432 | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.3' | |
- name: Validate composer.json and composer.lock | |
run: composer validate --strict | |
- name: Install dependencies | |
run: composer install | |
- name: Prepare Laravel Application | |
run: | | |
php -r "file_exists('.env') || copy('.env.example', '.env');" | |
php artisan key:generate | |
- name: Run tests | |
run: | | |
php artisan migrate | |
php artisan test --coverage --coverage-clover storage/coverage/clover/clover.xml | |
env: | |
DB_CONNECTION: pgsql | |
DB_HOST: ${{ secrets.DB_HOST }} | |
DB_DATABASE: ${{ secrets.DB_TEST_DATABASE }} | |
DB_USERNAME: ${{ secrets.DB_USERNAME }} | |
DB_PASSWORD: ${{ secrets.DB_PASSWORD }} | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v4.0.1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ./storage/coverage/clover/clover.xml | |
slug: kaivladimirv/insurance-contracts-laravel |