Skip to content

Commit

Permalink
ci(twig bridge): add require dev for twig-bridge version
Browse files Browse the repository at this point in the history
  • Loading branch information
etienne-monsieurbiz committed Jan 24, 2024
1 parent a4cd225 commit e6c3b4a
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 29 deletions.
58 changes: 30 additions & 28 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down

0 comments on commit e6c3b4a

Please sign in to comment.