[Test app] Add resource package on test application #130
Workflow file for this run
This file contains 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: Continuous Integration | |
on: | |
pull_request: | |
paths-ignore: | |
- "*.md" | |
workflow_dispatch: ~ | |
workflow_call: ~ | |
jobs: | |
static-checks: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
php: [ "8.1", "8.2", "8.3" ] | |
symfony: [ "^6.4", "^7.0" ] | |
exclude: | |
- php: "8.1" | |
symfony: "^7.0" | |
name: "PHP ${{ matrix.php }} / Symfony ${{ matrix.symfony }}" | |
env: | |
APP_ENV: test | |
steps: | |
- name: "Checkout" | |
uses: actions/checkout@v3 | |
- name: "Setup PHP" | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: "${{ matrix.php }}" | |
tools: symfony | |
coverage: none | |
- name: "Restrict packages' versions" | |
run: | | |
composer global config --no-plugins allow-plugins.symfony/flex true | |
composer global require --no-progress --no-scripts --no-plugins "symfony/flex" | |
composer config extra.symfony.require "${{ matrix.symfony }}" | |
- name: Get Composer cache directory | |
id: composer-cache | |
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
- name: "Setup cache" | |
uses: actions/cache@v3 | |
with: | |
path: | | |
${{ steps.composer-cache.outputs.dir }} | |
key: ${{ github.run_id }}-${{ runner.os }}-${{ hashFiles('composer.json') }}-symfony-${{ matrix.symfony }} | |
- name: "Install dependencies" | |
run: composer update --no-interaction --no-scripts | |
- name: "Validate composer.json" | |
run: composer validate --strict --no-check-version | |
- name: "Check for security vulnerabilities" | |
run: symfony security:check | |
- name: "Validate Container" | |
run: bin/console lint:container | |
- name: Validate Package versions | |
run: vendor/bin/monorepo-builder validate | |
- name: Run PHPStan | |
run: vendor/bin/phpstan analyse | |
- name: Run PHPUnit | |
run: vendor/bin/phpunit | |
- name: "Restrict packages' versions" | |
run: | | |
(cd src/TwigHooks/ && composer global config --no-plugins allow-plugins.symfony/flex true) | |
(cd src/TwigHooks/ && composer global require --no-progress --no-scripts --no-plugins "symfony/flex") | |
(cd src/TwigHooks/ && composer config extra.symfony.require "${{ matrix.symfony }}") | |
- name: "Install dependencies (Twig Hooks)" | |
run: (cd src/TwigHooks/ && composer update --no-interaction --no-scripts) | |
- name: Run PHPUnit (Twig Hooks) | |
run: (cd src/TwigHooks/ && vendor/bin/phpunit) |