Skip to content

FRAMEWORK_6_0

FRAMEWORK_6_0 #9

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
pull_request:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
PHPUnit:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: ['ubuntu-latest']
php-versions: ['7.4', '8.0', '8.1', '8.2', 'latest']
phpunit-versions: ['latest', '9.5']
steps:
- name: Setup github ssh key
run: mkdir -p ~/.ssh/ && ssh-keyscan -t rsa github.com > ~/.ssh/known_hosts
- name: Checkout
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: bcmath, ctype, curl, dom, gd, gettext, iconv, imagick, json, ldap, mbstring, mysql, opcache, openssl, pcntl, pdo, posix, redis, soap, sockets, sqlite, tokenizer, xmlwriter, xdiff
ini-values: post_max_size=512M, max_execution_time=360
coverage: xdebug
tools: php-cs-fixer, phpunit:${{ matrix.phpunit-versions }}, composer:v2, phpstan, phive
- name: Setup problem matchers for PHP
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
- name: Setup problem matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Setup Github Token as composer credential
run: composer config -g github-oauth.github.com ${{ secrets.GITHUB_TOKEN }}
- name: Install development dependencies
run: |
COMPOSER_ROOT_VERSION=dev-FRAMEWORK_6_0 composer config minimum-stability dev
COMPOSER_ROOT_VERSION=dev-FRAMEWORK_6_0 composer config allow-plugins true
COMPOSER_ROOT_VERSION=dev-FRAMEWORK_6_0 composer install --no-progress
- name: Run PHPUnit
run: phpunit
- name: Upload Test Results
run: |
cd .phpunit.results.cache
export REPO=$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $2}' | sed -e "s/:refs//")
tar zcf results.tar.gz *
echo "curl ${{ secrets.CI_URI }}/ci/phpunit/${{ secrets.CI_COMPOSER_VENDOR }}/$REPO/${GITHUB_REF##*/}/${{ matrix.php-versions }} -H \"Authorization: Bearer ${{ secrets.CI_BEARER_AUTH_VALUE }}\" -T results.tar.gz"
curl ${{ secrets.CI_URI }}/ci/phpunit/${{ secrets.CI_COMPOSER_VENDOR }}/$REPO/${GITHUB_REF##*/}/${{ matrix.php-versions }} -H "Authorization: Bearer ${{ secrets.CI_BEARER_AUTH_VALUE }}" -T results.tar.gz
- name: Run PHPStan for the src/ dir
run: if [ -d src ]; then phpstan analyse --no-progress src; else echo "NO PHPSTAN"; fi