Add debug #479
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Tests | |
| on: | |
| push: | |
| pull_request: | |
| schedule: | |
| - cron: '30 7 * * 1' | |
| jobs: | |
| tests: | |
| if: (github.event_name == 'schedule' && github.repository == 'e-commit/EcommitCrudBundle') || (github.event_name != 'schedule') | |
| timeout-minutes: 10 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| #Mini (for each Symfony version) | |
| - php-version: '8.1' | |
| symfony-version: '6.4.*' | |
| composer-flags: '--prefer-stable --prefer-lowest' | |
| description: 'with SF 6.4.* lowest' | |
| - php-version: '8.2' | |
| symfony-version: '7.1.*' | |
| composer-flags: '--prefer-stable --prefer-lowest' | |
| description: 'with SF 7.1.* lowest' | |
| - php-version: '8.2' | |
| symfony-version: '7.2.*' | |
| composer-flags: '--prefer-stable --prefer-lowest' | |
| description: 'with SF 7.2.* lowest' | |
| - php-version: '8.2' | |
| symfony-version: '7.3.*' | |
| composer-flags: '--prefer-stable --prefer-lowest' | |
| description: 'with SF 7.3.* lowest' | |
| #Symfony versions | |
| - php-version: '8.4' | |
| symfony-version: '6.4.*' | |
| description: 'with SF 6.4.*' | |
| - php-version: '8.4' | |
| symfony-version: '6.4.*@dev' | |
| description: 'with SF 6.4.* dev' | |
| - php-version: '8.4' | |
| symfony-version: '7.1.*' | |
| description: 'with SF 7.1.*' | |
| - php-version: '8.4' | |
| symfony-version: '7.2.*' | |
| description: 'with SF 7.2.*' | |
| - php-version: '8.4' | |
| symfony-version: '7.2.*@dev' | |
| description: 'with SF 7.2.* dev' | |
| - php-version: '8.4' | |
| symfony-version: '7.3.*' | |
| description: 'with SF 7.3.*' | |
| - php-version: '8.4' | |
| symfony-version: '7.3.*@dev' | |
| description: 'with SF 7.3.* dev' | |
| - php-version: '8.4' | |
| symfony-version: '7.4.*@dev' | |
| description: 'with SF 7.4.* dev' | |
| #PHP versions | |
| - php-version: '8.1' | |
| - php-version: '8.2' | |
| - php-version: '8.3' | |
| - php-version: '8.4' | |
| #CS | |
| - php-version: '8.2' | |
| description: 'with Coding Standards' | |
| coding-standards: true | |
| #Static Analysis (min PHP version) | |
| - php-version: '8.1' | |
| description: 'with Static Analysis' | |
| static-analysis: true | |
| name: PHP ${{ matrix.php-version }} ${{ matrix.description }} | |
| runs-on: 'ubuntu-latest' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v2 | |
| - name: Install system dependencies | |
| run: | | |
| sudo rm -rf ~/.nvm && curl -sL "https://deb.nodesource.com/setup_16.x" | sudo -E bash - | |
| sudo apt-get install -y nodejs | |
| sudo npm install -g yarn | |
| sudo apt-get install xvfb | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php-version }} | |
| extensions: "pdo_sqlite, zip" | |
| coverage: none | |
| tools: flex | |
| env: | |
| update: true | |
| - name: Display versions | |
| run: | | |
| php -r 'foreach (get_loaded_extensions() as $extension) echo $extension . " " . phpversion($extension) . PHP_EOL;' | |
| php -i | |
| - name: Get Composer cache directory | |
| id: composer-cache | |
| run: echo "::set-output name=dir::$(composer config cache-dir)" | |
| - name: Get yarn cache directory | |
| id: yarn-cache | |
| run: echo "::set-output name=dir::$(yarn cache dir)" | |
| - name: Cache dependencies | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ${{ steps.composer-cache.outputs.dir }} | |
| ${{ steps.yarn-cache.outputs.dir }} | |
| key: composer-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('**/composer.*') }}-${{ matrix.composer-flags }}-${{ hashFiles('**/yarn.lock') }} | |
| restore-keys: composer-${{ runner.os }}-${{ matrix.php-version }}- | |
| - name: Configure minimum stability | |
| if: matrix.symfony-version && contains(matrix.symfony-version, '@dev') | |
| run: composer config minimum-stability dev | |
| - name: Remove friendsofphp/php-cs-fixer | |
| if: matrix.coding-standards != true | |
| run: composer remove friendsofphp/php-cs-fixer --dev --no-update | |
| - name: Remove vimeo/psalm | |
| if: matrix.static-analysis != true | |
| run: composer remove vimeo/psalm --dev --no-update | |
| - name: Configure Symfony Flex | |
| if: matrix.symfony-version | |
| run: composer config extra.symfony.require ${{ matrix.symfony-version }} | |
| - name: Install dependencies | |
| run: | | |
| composer update --no-interaction --no-progress ${{ matrix.composer-flags }} | |
| yarn install | |
| yarn encore dev | |
| - name: System info - Pre test build | |
| run: | | |
| chmod +x .github/system-info.sh | |
| .github/system-info.sh "Pre test build" | |
| - name: Run PHPUnit | |
| if: matrix.coding-standards != true && matrix.static-analysis != true | |
| run: PANTHER_NO_HEADLESS=1 php vendor/phpunit/phpunit/phpunit --debug | |
| - name: System info - Post test run failure | |
| if: ${{ failure() && steps.phpunit.conclusion == 'failure' }} | |
| run: .github/system-info.sh "Post test run failure" | |
| - name: Run Karma | |
| if: matrix.coding-standards != true && matrix.static-analysis != true | |
| run: xvfb-run ./node_modules/.bin/karma start --single-run | |
| - name: Run PHP CS Fixer | |
| if: matrix.coding-standards | |
| run: php vendor/friendsofphp/php-cs-fixer/php-cs-fixer fix --diff --dry-run -v | |
| - name: Analyze composer dependencies | |
| if: matrix.coding-standards | |
| run: | | |
| curl -LSs https://github.com/maglnet/ComposerRequireChecker/releases/latest/download/composer-require-checker.phar > composer-require-checker.phar | |
| php composer-require-checker.phar check composer.json | |
| - name: Check license year | |
| if: matrix.coding-standards | |
| run: cat LICENSE |grep -E "\(c\) ([0-9]+\-)*`date +%Y`" | |
| - name: Run ESLint | |
| if: matrix.coding-standards | |
| run: ./node_modules/.bin/eslint assets/js/* tests/assets/js/* | |
| - name: Run Psalm | |
| if: matrix.static-analysis | |
| run: php vendor/bin/psalm --stats --output-format=github |