Skip to content

laravel arrays

laravel arrays #79

Workflow file for this run

name: Test Suite
on:
# Controls when the action will be triggered.
push: # A push to any branch.
pull_request: # A pull request to the trunk (main/master branch).
branches: [ trunk ]
# 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:
php-tests:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- php: '8.1'
#composer-flags: '--prefer-lowest' # We don't need this since this package has no external dependencies.
- php: '8.2'
- php: '8.3'
- php: '8.4'
allow_failure: true
extra_require: 'nette/tester:dev-master'
# Steps represent a sequence of tasks that will be executed as part of the job
name: "PHP${{ matrix.php }} ${{ matrix.composer-flags }}"
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
# extensions: json
# ini-values: "post_max_size=256M" #optional
coverage: pcov
- name: Validate composer.json and composer.lock
run: composer validate --strict
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v4
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-php-
- name: Override packages
if: ${{ matrix.extra_require }}
run: composer require --dev ${{ matrix.extra_require }}
continue-on-error: ${{ matrix.allow_failure }}
- name: Update composer dependencies
run: composer update -o --no-interaction --no-progress --prefer-dist ${{ matrix.composer-flags }}
continue-on-error: ${{ matrix.allow_failure }}
- name: Run TEST suite
run: composer run-script test:ci -- -C --coverage tests/output/coverage.xml --coverage-src=src
continue-on-error: ${{ matrix.allow_failure }}
#run: vendor/bin/tester tests -C --coverage tests/output/coverage.xml --coverage-src=src
- name: Install php-coveralls
if: ${{ !matrix.allow_failure }}
run: composer global require -o --no-interaction --no-progress --prefer-dist php-coveralls/php-coveralls
- name: Upload coverage results to Coveralls
if: ${{ !matrix.allow_failure }}
uses: nick-invision/retry@v3
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_PARALLEL: true
COVERALLS_FLAG_NAME: "PHP${{ matrix.php }}"
with:
timeout_seconds: 60
max_attempts: 3
command: php-coveralls -x tests/output/coverage.xml -o tests/output/upload.json -v
coveralls-finish:
needs: php-tests
runs-on: ubuntu-latest
steps:
- name: Notify Coveralls when build is finished
uses: coverallsapp/github-action@main
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true