Skip to content

Migrate commands to use AsCommand attribute #2007

Migrate commands to use AsCommand attribute

Migrate commands to use AsCommand attribute #2007

Workflow file for this run

on:
pull_request:
branches-ignore: gh-pages
push:
branches:
- main
name: build
permissions:
contents: read
jobs:
phpcs:
name: Code style
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
ini-values: memory_limit=-1, date.timezone='UTC'
tools: phpcs
- name: Check production code style
run: composer cs-prod
- name: Check test code style
run: composer cs-tests
linux:
name: PHP ${{ matrix.php }}-${{ matrix.os }}-${{ matrix.mode }}
env:
extensions: curl, mbstring, openssl, pdo, pdo_sqlite
SYMFONY_DEPRECATIONS_HELPER: weak
COMPOSER_ROOT_VERSION: 5.0.99
COLUMNS: 120
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
php: ['8.2', '8.3', '8.4']
mode: ['stable', 'experimental']
exclude:
- php: '8.2'
mode: 'experimental'
- php: '8.3'
mode: 'experimental'
- php: '8.4'
mode: 'experimental'
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: ${{ env.extensions }}
ini-values: memory_limit=-1, date.timezone='UTC'
coverage: xdebug
tools: composer:v2
- name: Determine composer cache directory
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV
- name: Cache dependencies installed with composer
uses: actions/cache@v3
with:
path: ${{ env.COMPOSER_CACHE_DIR }}
key: php${{ matrix.php }}-${{ matrix.mode }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: |
php${{ matrix.php }}-${{ matrix.mode }}-composer-
- name: Update composer
run: composer self-update
- name: Validate composer.json
run: composer validate
- name: Install latest versions of dependencies in stable mode
if: matrix.mode == 'stable'
run: composer update --no-interaction --no-progress --optimize-autoloader --ansi
- name: Composer install lowest versions of dependencies on PHP 8.2 in experimental mode
if: matrix.php == '8.2' && matrix.mode == 'experimental'
run: composer update --prefer-lowest --no-interaction --no-progress --optimize-autoloader --ansi
- name: Test that failing test really fails
run: if php codecept run -c tests/data/claypit/ scenario FailedCept -vvv; then echo "Test hasn't failed"; false; fi;
# - name: Run tests without code coverage on PHP 8.2
# if: matrix.php == '8.2'
# run: |
# php -S 127.0.0.1:8008 -t tests/data/app >/dev/null 2>&1 &
# php codecept build
# php codecept run cli,unit
- name: Run tests
run: |
php -S 127.0.0.1:8008 -t tests/data/app -d pcov.directory=$(pwd)/tests/data/app >/dev/null 2>&1 &
php codecept build
php codecept run cli,unit,coverage --env COVERAGE=1
- name: Run module-asserts tests
run: php codecept run -c vendor/codeception/module-asserts/
- name: Run module-filesystem tests
run: php codecept run -c vendor/codeception/module-filesystem/
- name: Run module-db sqlite tests
run: php codecept run -c vendor/codeception/module-db/ unit :Sqlite
- name: Run module-phpbrowser tests
run: |
cd vendor/codeception/module-phpbrowser/
php -S 127.0.0.1:8000 -t tests/data/app >/dev/null 2>&1 &
php -S 127.0.0.1:8010 -t tests/data/rest >/dev/null 2>&1 &
php ../../../codecept run tests/unit/Codeception/Module/PhpBrowserTest.php
windows-latest:
name: PHP ${{ matrix.php }}-${{ matrix.os }}
env:
extensions: curl, mbstring, openssl, pdo, pdo_sqlite
SYMFONY_DEPRECATIONS_HELPER: weak
COMPOSER_ROOT_VERSION: 5.0.99
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest]
php: ['8.2', '8.3', '8.4']
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: ${{ env.extensions }}
ini-values: memory_limit=-1, date.timezone='UTC'
tools: composer:v2
- name: Determine composer cache directory
run: echo "COMPOSER_CACHE_DIR=~\\AppData\\Local\\Composer" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Cache dependencies installed with composer
uses: actions/cache@v3
with:
path: ${{ env.COMPOSER_CACHE_DIR }}
key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: |
php${{ matrix.php }}-composer-
- name: Update composer
run: composer self-update
- name: Validate composer.json
run: composer validate
- name: Install dependencies
run: composer install --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
- name: Run CLI tests
run: php codecept run cli --skip-group coverage
- name: Run unit tests
run: php codecept run unit -g core -g appveyor
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy