Skip to content

Commit

Permalink
Merge pull request #5 from BeMySlaveDarlin/f/composer-lock-update
Browse files Browse the repository at this point in the history
Updated composer packages
  • Loading branch information
Jeckerson authored Oct 19, 2021
2 parents c293051 + d6cc896 commit 25630f6
Show file tree
Hide file tree
Showing 4 changed files with 1,162 additions and 406 deletions.
128 changes: 73 additions & 55 deletions .github/workflows/testing-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,58 +2,76 @@ name: Testing Suite
on: [push, pull_request]

jobs:
build-and-test-linux:
services:
mongodb:
image: mongo:4.2
ports:
- 27017:27017
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest]
php-versions: ['7.4']

name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
steps:

- name: Git checkout
uses: actions/checkout@v2-beta
with:
fetch-depth: 1

- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Setup Cache
uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Setup Composer Token
run: |
# To increase the Composer rate limit we're use GitHub authentication
if [ -n "${{ secrets.COMPOSER_TOKEN }}" ]; then
composer config github-oauth.github.com "${{ secrets.COMPOSER_TOKEN }}"
fi
- name: Setup PHP
uses: shivammathur/setup-php@v1
with:
php-version: ${{ matrix.php-versions }}
ini-values: apc.enable_cli=on, session.save_path=/tmp
tools: pecl
extensions: mbstring, intl, json, imagick, phalcon

- name: Install packages
run: composer install --prefer-dist

- name: Setup tests
run: |
cp tests/_ci/.env.default .env
vendor/bin/codecept build
- name: Run integration tests
run: vendor/bin/codecept run --ext DotReporter integration --coverage --coverage-xml
run-tests:
name: PHP ${{ matrix.php-versions }} with Phalcon ${{ matrix.phalcon-versions }}
runs-on: ubuntu-latest
env:
extensions: mbstring, intl, json, phalcon-${{ matrix.phalcon-versions }}, xdebug
key: cache-v0.0.2
services:
mongodb:
image: mongo:4.2
ports:
- 27017:27017
strategy:
fail-fast: false
matrix:
php-versions: ['7.2', '7.3', '7.4']
# There is no 4.1.1 version due release bug
phalcon-versions: ['4.0.5', '4.0.6', '4.1.0', '4.1.2']
steps:
- uses: actions/checkout@v1
- 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 --no-suggest

- 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
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
},
"require-dev": {
"phalcon/ide-stubs": "^4.0",
"vimeo/psalm": "3.6.2",
"vimeo/psalm": "^4.1",
"squizlabs/php_codesniffer": "3.5.1",
"codeception/codeception": "^4.1",
"codeception/module-asserts": "^1.0.0",
Expand Down
Loading

0 comments on commit 25630f6

Please sign in to comment.