[#7] Completed first release #93
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: Workflow for Publisher API | |
on: [push, pull_request] | |
env: | |
XDEBUG_MODE: coverage | |
jobs: | |
container-run-tests: | |
runs-on: ubuntu-latest | |
container: php:8.2 | |
services: | |
test-database: | |
image: postgres:15 | |
env: | |
POSTGRES_PASSWORD: ChangeMe | |
POSTGRES_DB: app_test | |
POSTGRES_USER: app | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 5432:5432 | |
hoverfly: | |
image: spectolabs/hoverfly:v1.6.0 | |
# command: | |
# - "-webserver" | |
# - "-response-body-files-path=/hoverfly_app/responses" | |
# - "-import=/hoverfly_app/simulations/recommend.simulation.json" | |
volumes: | |
- "./hoverfly:/hoverfly_app" | |
ports: | |
- "8500:8500" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install package manager(composer) | |
run: curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer | |
- name: Install container dependencies | |
run: apt-get update && apt-get -y install git zip unzip libpq-dev && docker-php-ext-install pdo pdo_pgsql pgsql | |
- name: Install xdebug | |
run: pecl install xdebug && docker-php-ext-enable xdebug | |
- name: Install project dependencies | |
run: composer install --prefer-dist && composer dump-autoload | |
- name: Generate public/private keys | |
run: php bin/console lexik:jwt:generate-keypair | |
- name: Run doctrine migrations | |
run: php bin/console doctrine:migrations:migrate --env=test --no-interaction | |
- name: Load fixtures | |
run: php bin/console doctrine:fixtures:load --env=test --no-interaction | |
- name: Run tests and collect coverage | |
run: vendor/bin/phpunit --coverage-text --testdox --coverage-clover coverage.xml | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 |