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": {