Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix composer packages to pass twig linter #1016

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/workflows/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,29 @@ jobs:
- name: Build frontend (production)
run: npm run build

lint:
runs-on: ubuntu-latest
container:
image: danger89/mbin-pipeline:1.2.0
steps:
- uses: actions/checkout@v4

- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Calculate composer.lock hash
id: composer-lock-hash
run: |
echo "hash=$(md5sum composer.lock)" >> $GITHUB_OUTPUT

- uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-no-dev-${{ steps.composer-lock-hash.outputs.hash }}
restore-keys: ${{ runner.os }}-composer-no-dev-

unit-test:
runs-on: ubuntu-latest
container:
Expand Down Expand Up @@ -103,6 +126,36 @@ jobs:
- name: Run security checker
run: local-php-security-checker

twig-lint:
runs-on: ubuntu-latest
container:
image: danger89/mbin-pipeline:1.2.0
steps:
- uses: actions/checkout@v4

- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Calculate tools/composer.lock hash
id: composer-lock-hash
run: |
echo "hash=$(md5sum tools/composer.lock)" >> $GITHUB_OUTPUT

- uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-tools-${{ steps.composer-lock-hash.outputs.hash }}
restore-keys: ${{ runner.os }}-composer-tools-

- run: cp .env.example .env
- name: Composer install
run: composer install --no-scripts --no-progress

- name: Twig linter
run: php bin/console lint:twig

fixer-dry-run:
runs-on: ubuntu-latest
container:
Expand Down
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@
"symfony/serializer": "7.1.*",
"symfony/string": "7.1.*",
"symfony/translation": "7.1.*",
"symfony/type-info": "7.1.*",
"symfony/twig-bundle": "7.1.*",
"symfony/type-info": "7.1.*",
"symfony/uid": "7.1.*",
"symfony/ux-autocomplete": "^2.18.0",
"symfony/ux-chartjs": "^2.18.0",
Expand All @@ -110,7 +110,9 @@
"twig/cssinliner-extra": "^3.10.0",
"twig/extra-bundle": "^3.10.0",
"twig/html-extra": "^3.10.0",
"twig/inky-extra": "^3.11",
"twig/intl-extra": "^3.10.0",
"twig/markdown-extra": "^3.11",
"twig/twig": "^3.10.3",
"webmozart/assert": "^1.11.0",
"wohali/oauth2-discord-new": "^1.2.1"
Expand Down
Loading
Loading