From e6c3b4a58be3ac8bd141dbd1d9c73bfc8c9dbc72 Mon Sep 17 00:00:00 2001 From: Etienne Gutbub Date: Wed, 24 Jan 2024 11:39:46 +0100 Subject: [PATCH] ci(twig bridge): add require dev for twig-bridge version --- .github/workflows/tests.yaml | 58 +++++++++++++++++++----------------- composer.json | 3 +- 2 files changed, 32 insertions(+), 29 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 42c05029..25bed714 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -30,34 +30,36 @@ jobs: with: node-version: '14' - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - ini-values: date.timezone=UTC - tools: symfony-cli - - - name: Set project php-version - run: | - echo ${{ matrix.php }} > .php-version - - - name: Determine composer cache directory - id: composer-cache-directory - run: echo "directory=$(composer config cache-dir)" >> $GITHUB_OUTPUT - - - name: Cache dependencies installed with composer - uses: actions/cache@v3 - id: cache-composer - with: - path: ${{ steps.composer-cache-directory.outputs.directory }} - key: composer2-php:${{ matrix.php }}-${{ hashFiles('**/composer.json') }} - restore-keys: composer2-php:${{ matrix.php }}- - - - name: Ensure that composer cache directory exists - run: mkdir -p ${{ steps.composer-cache-directory.outputs.directory }} - - - name: Composer Github Auth - run: composer config -g github-oauth.github.com ${{ github.token }} + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + ini-values: date.timezone=UTC + + - name: Set project php-version + run: | + echo ${{ matrix.php }} > .php-version + + - name: Install symfony CLI + run: | + curl https://get.symfony.com/cli/installer | bash + echo "${HOME}/.symfony5/bin" >> $GITHUB_PATH + + - uses: actions/cache@v3 + id: cache-composer + with: + path: /home/runner/.composer/cache + key: composer2-php:${{ matrix.php }}-${{ github.sha }} + restore-keys: composer2-php:${{ matrix.php }}- + + - run: mkdir -p /home/runner/{.composer/cache,.config/composer} + if: steps.cache-composer.outputs.cache-hit != 'true' + + - name: Composer + run: sudo composer self-update + + - name: Composer Github Auth + run: composer config -g github-oauth.github.com ${{ github.token }} - run: make install diff --git a/composer.json b/composer.json index 7ec49778..5cd28448 100644 --- a/composer.json +++ b/composer.json @@ -43,7 +43,8 @@ "symfony/flex": "@stable", "symfony/web-profiler-bundle": "@stable", "phpmd/phpmd": "@stable", - "friendsofphp/php-cs-fixer": "@stable" + "friendsofphp/php-cs-fixer": "@stable", + "symfony/twig-bridge": "^4.4" }, "prefer-stable": true, "autoload": {