Lock Phalcon version in 'validations' job #13
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: Tests & Validations | |
on: [ push ] | |
jobs: | |
validations: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '7.4' | |
extensions: mbstring, intl, json, mongodb, phalcon-5.4.0, xdebug | |
tools: pecl | |
ini-values: apc.enable_cli=on, session.save_path=/tmp | |
- run: composer install --no-interaction --no-ansi --no-progress | |
- name: run psalm | |
if: always() | |
run: vendor/bin/psalm | |
- name: run phpcs | |
run: vendor/bin/phpcs | |
run-tests: | |
name: PHP ${{ matrix.php-versions }} with Phalcon ${{ matrix.phalcon-versions }} | |
runs-on: ubuntu-latest | |
env: | |
extensions: mbstring, intl, json, mongodb, phalcon-${{ matrix.phalcon-versions }}, xdebug | |
key: cache-${{ matrix.phalcon-versions }}-${{ matrix.php-versions }} | |
services: | |
mongodb: | |
image: mongo | |
ports: | |
- 27017:27017 | |
strategy: | |
fail-fast: false | |
matrix: | |
php-versions: [ '7.4', '8.0', '8.1', '8.2' ] | |
phalcon-versions: [ '5.0.0', '5.0.1', '5.0.2', '5.0.3', '5.0.4', '5.0.5', '5.1.0', '5.1.1', '5.1.2', '5.1.3', '5.1.4', '5.2.0', '5.2.1', '5.2.2', '5.3.0', '5.3.1', '5.4.0' ] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup cache environment | |
id: cache-env | |
uses: shivammathur/cache-extensions@v1 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
extensions: ${{ env.extensions }} | |
key: ${{ env.key }} | |
- name: Cache extensions | |
uses: actions/cache@v1 | |
with: | |
path: ${{ steps.cache-env.outputs.dir }} | |
key: ${{ steps.cache-env.outputs.key }} | |
restore-keys: ${{ steps.cache-env.outputs.key }} | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
extensions: ${{ env.extensions }} | |
tools: pecl | |
ini-values: apc.enable_cli=on, session.save_path=/tmp | |
- name: Get Composer Cache Directory | |
id: composer-cache | |
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | |
- name: Cache composer dependencies | |
uses: actions/cache@v1 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
restore-keys: ${{ runner.os }}-composer- | |
- name: Install Composer dependencies | |
run: composer install --prefer-dist | |
- name: Copy .env file | |
run: cp tests/_ci/.env.default .env | |
- name: Setup tests | |
if: success() | |
run: vendor/bin/codecept build | |
- name: Run integration tests | |
if: success() | |
run: vendor/bin/codecept run --ext DotReporter integration --coverage --coverage-xml=coverage-${{ matrix.php-versions }}.xml | |
- name: Upload coverage to Codecov | |
if: success() | |
uses: codecov/codecov-action@v1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./tests/_output/coverage-*.xml |