Skip to content

Merge pull request #111 from s-ohnishi/v5compatible #28

Merge pull request #111 from s-ohnishi/v5compatible

Merge pull request #111 from s-ohnishi/v5compatible #28

Workflow file for this run

name: Main CI
on: [push, pull_request]
env:
DB_HOST: '127.0.0.1'
jobs:
run:
runs-on: ubuntu-latest
services:
mysql:
image: mysql:5.7
ports:
- "3306:3306"
env:
MYSQL_ROOT_PASSWORD: secret
MYSQL_USER: phalcon
MYSQL_DATABASE: phalcon_invo
MYSQL_PASSWORD: secret
strategy:
fail-fast: false
matrix:
php: ['8.0', '8.1' ]
steps:
- uses: actions/checkout@v3
- name: Copy .env file
run: cp .env.example .env
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: pecl
extensions: mbstring, intl, json, phalcon-5.1.4
coverage: xdebug
- name: Validate composer.json and composer.lock
run: composer validate
- name: Install Composer dependencies
run: composer install --prefer-dist --no-progress --no-suggest
# Disabling temporarily
# - name: Run Psalm
# if: always()
# run: vendor/bin/psalm --show-info=false
- name: Run tests
if: always()
run: |
sudo php -S 127.0.0.1:8000 -t public/ &
vendor/bin/codecept build
vendor/bin/codecept run acceptance
vendor/bin/codecept run unit --coverage-xml=unit-coverage.xml
vendor/bin/codecept run functional --coverage-xml=functional-coverage.xml
- name: Upload coverage to Codecov
if: success()
uses: codecov/codecov-action@v3
with:
token: ${{secrets.CODECOV_TOKEN}}
directory: ./tests/_output/
files: unit-coverage.xml,functional-coverage.xml