Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions .github/workflows/deploy-distributables.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,17 @@ jobs:
fetch-depth: 0 # fetch all tags

- name: Get latest version
id: version
run: |
echo 'LATEST_VERSION<<EOF' >> $GITHUB_ENV
echo $(git describe --tags --abbrev=0) | sed "s/v//" >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
echo 'LATEST_VERSION<<EOF' >> $GITHUB_OUTPUT
echo $(git describe --tags --abbrev=0) | sed "s/v//" >> $GITHUB_OUTPUT
echo 'EOF' >> $GITHUB_OUTPUT

- name: Search for updated version
if: ${{ env.LATEST_VERSION }}
if: ${{ steps.version.outputs.LATEST_VERSION }}
run: |
chmod +x ${GITHUB_WORKSPACE}/.github/scripts/validate-version
${GITHUB_WORKSPACE}/.github/scripts/validate-version ${{ env.LATEST_VERSION }}
${GITHUB_WORKSPACE}/.github/scripts/validate-version ${{ steps.version.outputs.LATEST_VERSION }}

framework:
name: Deploy to framework
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/reusable-coveralls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,14 @@ jobs:
working-directory: build/cov

- name: Get composer cache directory
id: composer-cache
run: |
echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV
echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache dependencies
uses: actions/cache@v5
with:
path: ${{ env.COMPOSER_CACHE_FILES_DIR }}
path: ${{ steps.composer-cache.outputs.COMPOSER_CACHE_FILES_DIR }}
key: ${{ github.job }}-php-${{ inputs.php-version }}-${{ hashFiles('**/composer.*') }}
restore-keys: |
${{ github.job }}-php-${{ inputs.php-version }}-
Expand Down
18 changes: 10 additions & 8 deletions .github/workflows/reusable-phpunit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,14 +173,15 @@ jobs:
COVERAGE_DRIVER: ${{ inputs.enable-coverage && 'xdebug' || 'none' }}

- name: Setup global environment variables
id: setup-env
run: |
echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV
echo "ARTIFACT_NAME=${{ inputs.job-id || github.job }}-php-${{ inputs.php-version }}-db-${{ inputs.db-platform || 'none' }}${{ inputs.mysql-version || '' }}" >> $GITHUB_ENV
echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
echo "ARTIFACT_NAME=${{ inputs.job-id || github.job }}-php-${{ inputs.php-version }}-db-${{ inputs.db-platform || 'none' }}${{ inputs.mysql-version || '' }}" >> $GITHUB_OUTPUT

- name: Cache dependencies
uses: actions/cache@v5
with:
path: ${{ env.COMPOSER_CACHE_FILES_DIR }}
path: ${{ steps.setup-env.outputs.COMPOSER_CACHE_FILES_DIR }}
key: ${{ inputs.job-id || github.job }}-php-${{ inputs.php-version }}-db-${{ inputs.db-platform || 'none' }}-${{ hashFiles('**/composer.*') }}
restore-keys: |
${{ inputs.job-id || github.job }}-php-${{ inputs.php-version }}-db-${{ inputs.db-platform || 'none' }}-
Expand All @@ -202,14 +203,15 @@ jobs:
composer update --ansi ${{ inputs.extra-composer-options }}

- name: Compute additional PHPUnit options
id: phpunit-options
run: |
echo "EXTRA_PHPUNIT_OPTIONS=${{ format('{0} {1} {2}', env.GROUP_OPTION, env.COVERAGE_OPTION, inputs.extra-phpunit-options) }}" >> $GITHUB_ENV
echo "EXTRA_PHPUNIT_OPTIONS=${{ format('{0} {1} {2}', env.GROUP_OPTION, env.COVERAGE_OPTION, inputs.extra-phpunit-options) }}" >> $GITHUB_OUTPUT
env:
COVERAGE_OPTION: ${{ inputs.enable-coverage && format('--coverage-php build/cov/coverage-{0}.cov', env.ARTIFACT_NAME) || '--no-coverage' }}
COVERAGE_OPTION: ${{ inputs.enable-coverage && format('--coverage-php build/cov/coverage-{0}.cov', steps.setup-env.outputs.ARTIFACT_NAME) || '--no-coverage' }}
GROUP_OPTION: ${{ inputs.group-name && format('--group {0}', inputs.group-name) || '' }}

- name: Run tests
run: script -e -c "vendor/bin/phpunit --color=always ${{ env.EXTRA_PHPUNIT_OPTIONS }}"
run: script -e -c "vendor/bin/phpunit --color=always ${{ steps.phpunit-options.outputs.EXTRA_PHPUNIT_OPTIONS }}"
env:
DB: ${{ inputs.db-platform }}
TACHYCARDIA_MONITOR_GA: ${{ inputs.enable-profiling && 'enabled' || '' }}
Expand All @@ -220,7 +222,7 @@ jobs:
if: ${{ inputs.enable-artifact-upload }}
uses: actions/upload-artifact@v6
with:
name: ${{ env.ARTIFACT_NAME }}
path: build/cov/coverage-${{ env.ARTIFACT_NAME }}.cov
name: ${{ steps.setup-env.outputs.ARTIFACT_NAME }}
path: build/cov/coverage-${{ steps.setup-env.outputs.ARTIFACT_NAME }}.cov
if-no-files-found: error
retention-days: 1
18 changes: 10 additions & 8 deletions .github/workflows/reusable-serviceless-phpunit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,15 @@ jobs:
COVERAGE_DRIVER: ${{ inputs.enable-coverage && 'xdebug' || 'none' }}

- name: Setup global environment variables
id: setup-env
run: |
echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV
echo "ARTIFACT_NAME=${{ inputs.job-id || github.job }}-php-${{ inputs.php-version }}" >> $GITHUB_ENV
echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
echo "ARTIFACT_NAME=${{ inputs.job-id || github.job }}-php-${{ inputs.php-version }}" >> $GITHUB_OUTPUT

- name: Cache Composer dependencies
uses: actions/cache@v5
with:
path: ${{ env.COMPOSER_CACHE_FILES_DIR }}
path: ${{ steps.setup-env.outputs.COMPOSER_CACHE_FILES_DIR }}
key: ${{ inputs.job-id || github.job }}-php-${{ inputs.php-version }}-${{ hashFiles('**/composer.*') }}
restore-keys: |
${{ inputs.job-id || github.job }}-php-${{ inputs.php-version }}-
Expand All @@ -113,14 +114,15 @@ jobs:
composer update --ansi ${{ inputs.extra-composer-options }}

- name: Compute additional PHPUnit options
id: phpunit-options
run: |
echo "EXTRA_PHPUNIT_OPTIONS=${{ format('{0} {1} {2}', env.GROUP_OPTION, env.COVERAGE_OPTION, inputs.extra-phpunit-options) }}" >> $GITHUB_ENV
echo "EXTRA_PHPUNIT_OPTIONS=${{ format('{0} {1} {2}', env.GROUP_OPTION, env.COVERAGE_OPTION, inputs.extra-phpunit-options) }}" >> $GITHUB_OUTPUT
env:
COVERAGE_OPTION: ${{ inputs.enable-coverage && format('--coverage-php build/cov/coverage-{0}.cov', env.ARTIFACT_NAME) || '--no-coverage' }}
COVERAGE_OPTION: ${{ inputs.enable-coverage && format('--coverage-php build/cov/coverage-{0}.cov', steps.setup-env.outputs.ARTIFACT_NAME) || '--no-coverage' }}
GROUP_OPTION: ${{ inputs.group-name && format('--group {0}', inputs.group-name) || '' }}

- name: Run tests
run: script -e -c "vendor/bin/phpunit --color=always ${{ env.EXTRA_PHPUNIT_OPTIONS }}"
run: script -e -c "vendor/bin/phpunit --color=always ${{ steps.phpunit-options.outputs.EXTRA_PHPUNIT_OPTIONS }}"
env:
TACHYCARDIA_MONITOR_GA: ${{ inputs.enable-profiling && 'enabled' || '' }}
TERM: xterm-256color
Expand All @@ -129,7 +131,7 @@ jobs:
if: ${{ inputs.enable-artifact-upload }}
uses: actions/upload-artifact@v6
with:
name: ${{ env.ARTIFACT_NAME }}
path: build/cov/coverage-${{ env.ARTIFACT_NAME }}.cov
name: ${{ steps.setup-env.outputs.ARTIFACT_NAME }}
path: build/cov/coverage-${{ steps.setup-env.outputs.ARTIFACT_NAME }}.cov
if-no-files-found: error
retention-days: 1
5 changes: 3 additions & 2 deletions .github/workflows/test-coding-standards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,13 @@ jobs:
coverage: none

- name: Get composer cache directory
run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV
id: composer-cache
run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache dependencies
uses: actions/cache@v5
with:
path: ${{ env.COMPOSER_CACHE_FILES_DIR }}
path: ${{ steps.composer-cache.outputs.COMPOSER_CACHE_FILES_DIR }}
key: ${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.php-version }}-
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/test-deptrac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,13 @@ jobs:
run: composer validate --strict

- name: Get composer cache directory
run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV
id: composer-cache
run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache dependencies
uses: actions/cache@v5
with:
path: ${{ env.COMPOSER_CACHE_FILES_DIR }}
path: ${{ steps.composer-cache.outputs.COMPOSER_CACHE_FILES_DIR }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-

Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/test-phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,13 @@ jobs:
run: composer validate --strict

- name: Get composer cache directory
run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV
id: composer-cache
run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache dependencies
uses: actions/cache@v5
with:
path: ${{ env.COMPOSER_CACHE_FILES_DIR }}
path: ${{ steps.composer-cache.outputs.COMPOSER_CACHE_FILES_DIR }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-

Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/test-phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ jobs:
enable-coverage: ${{ matrix.php-version == needs.coverage-php-version.outputs.version }}
enable-profiling: ${{ matrix.php-version == needs.coverage-php-version.outputs.version }}
extra-extensions: imagick, redis, memcached
extra-composer-options: ${{ matrix.composer-option }}

database-live-tests:
name: DatabaseLive
Expand Down Expand Up @@ -112,7 +111,6 @@ jobs:
enable-coverage: ${{ matrix.php-version == needs.coverage-php-version.outputs.version }}
enable-profiling: ${{ matrix.php-version == needs.coverage-php-version.outputs.version }}
extra-extensions: mysqli, oci8, pgsql, sqlsrv, sqlite3
extra-composer-options: ${{ matrix.composer-option }}

separate-process-tests:
name: SeparateProcess
Expand All @@ -138,7 +136,6 @@ jobs:
enable-coverage: true # needs xdebug for assertHeaderEmitted() tests
enable-profiling: ${{ matrix.php-version == needs.coverage-php-version.outputs.version }}
extra-extensions: mysqli, oci8, pgsql, sqlsrv-5.10.1, sqlite3
extra-composer-options: ${{ matrix.composer-option }}

cache-live-tests:
name: CacheLive
Expand All @@ -165,7 +162,6 @@ jobs:
enable-profiling: ${{ matrix.php-version == needs.coverage-php-version.outputs.version }}
extra-extensions: redis, memcached, apcu
extra-ini-options: apc.enable_cli=1
extra-composer-options: ${{ matrix.composer-option }}

coveralls:
name: Upload coverage results to Coveralls
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/test-psalm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,13 @@ jobs:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Get composer cache directory
run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV
id: composer-cache
run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache composer dependencies
uses: actions/cache@v5
with:
path: ${{ env.COMPOSER_CACHE_FILES_DIR }}
path: ${{ steps.composer-cache.outputs.COMPOSER_CACHE_FILES_DIR }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/test-rector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,13 @@ jobs:
run: composer validate --strict

- name: Get composer cache directory
run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV
id: composer-cache
run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache dependencies
uses: actions/cache@v5
with:
path: ${{ env.COMPOSER_CACHE_FILES_DIR }}
path: ${{ steps.composer-cache.outputs.COMPOSER_CACHE_FILES_DIR }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-

Expand Down
15 changes: 7 additions & 8 deletions admin/starter/.github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,14 @@ jobs:

strategy:
matrix:
php-versions: ['8.2', '8.4']
php-versions: ['8.2', '8.5']

runs-on: ubuntu-latest

if: (! contains(github.event.head_commit.message, '[ci skip]'))
if: (! contains(github.event.pull_request.title, '[ci skip]'))

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v6

- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2
Expand All @@ -31,17 +30,17 @@ jobs:

- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache composer dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
path: ${{ steps.composer-cache.outputs.COMPOSER_CACHE_DIR }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install dependencies
run: composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader
run: composer install --no-progress --no-interaction
# To prevent rate limiting you may need to supply an OAuth token in Settings > Secrets
# env:
# https://getcomposer.org/doc/articles/troubleshooting.md#api-rate-limit-and-oauth-tokens
Expand Down
Loading