Skip to content

Merge pull request #10 from phalcon/dependabot/composer/aws/aws-sdk-p… #64

Merge pull request #10 from phalcon/dependabot/composer/aws/aws-sdk-p…

Merge pull request #10 from phalcon/dependabot/composer/aws/aws-sdk-p… #64

Workflow file for this run

name: "Tests"
on: [ push, pull_request ]
jobs:
run-tests:
name: PHP ${{ matrix.php-versions }}
runs-on: ubuntu-latest
env:
extensions: mbstring, intl, json, phalcon, xdebug
key: cache-v0.0.2
strategy:
fail-fast: false
matrix:
php-versions: [ '7.4', '8.0', '8.1', '8.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
- 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: Run test suites
if: success()
run: vendor/bin/codecept run --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