Fix .gitattributes #141
Workflow file for this run
This file contains hidden or 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
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| code_quality: | |
| name: Code Quality | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: 8.2 | |
| tools: symfony-cli | |
| - name: Install Composer dependencies | |
| run: symfony composer install --prefer-dist --no-interaction --no-progress | |
| - name: Run Easy Coding Standard | |
| run: symfony php vendor/bin/ecs | |
| - name: Run PHPStan | |
| run: symfony php vendor/bin/phpstan analyze | |
| e2e: | |
| runs-on: ${{ matrix.os || 'ubuntu-latest' }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| php-version: [ '8.1', '8.2', '8.3', '8.4' ] | |
| dependency-version: [ '' ] | |
| symfony-version: [ '' ] | |
| minimum-stability: [ 'stable' ] | |
| include: | |
| # dev packages (probably not needed to have multiple such jobs) | |
| - minimum-stability: 'dev' | |
| php-version: '8.4' | |
| # lowest deps | |
| - php-version: '8.1' | |
| dependency-version: 'lowest' | |
| # LTS version of Symfony | |
| - php-version: '8.1' | |
| symfony-version: '6.4.*' | |
| # Explicit Symfony versions | |
| - php-version: '8.1' | |
| symfony-version: '6.4.*' | |
| - php-version: '8.2' | |
| symfony-version: '7.0.*' | |
| - php-version: '8.4' | |
| symfony-version: '8.0.*' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php-version }} | |
| tools: symfony-cli, flex | |
| - name: Allow Flex Plugin | |
| run: composer global config --no-plugins allow-plugins.symfony/flex true | |
| - name: Configure Composer stability | |
| run: composer config minimum-stability ${{ matrix.minimum-stability }} | |
| - name: Install Composer dependencies | |
| run: | | |
| composer update ${{ matrix.dependency-version == 'lowest' && '--prefer-lowest' || '' }} | |
| env: | |
| SYMFONY_REQUIRE: ${{ matrix.symfony-version || '>=6.4' }} | |
| - name: Create a new Symfony project | |
| run: | | |
| git config --global user.email "hugo@alliau.me" | |
| git config --global user.name "Hugo Alliaume" | |
| case "${{ matrix.php-version }}" in | |
| 8.1) symfony new my_app --version="6.4.*" --webapp ;; | |
| 8.2) symfony new my_app --version="7.1.*" --webapp ;; | |
| 8.3) symfony new my_app --version="7.2.*" --webapp ;; | |
| 8.4) case "${{ matrix.symfony-version }}" in | |
| 8.0.*) symfony new my_app --version="8.0.*" --webapp ;; | |
| *) symfony new my_app --version="7.3.*" --webapp ;; | |
| esac ;; | |
| esac | |
| - name: Install kocal/biome-js-bundle | |
| working-directory: my_app | |
| run: | | |
| symfony composer config minimum-stability dev | |
| symfony composer config --json extra.symfony.allow-contrib 'true' | |
| symfony composer config repositories.biome-js-bundle '{"type":"path", "url":"../","options":{"symlink":true}}' | |
| cat << EOF > config/packages/kocal_biome_js.yaml | |
| when@dev: | |
| kocal_biome_js: | |
| binary_version: '2.0.0' | |
| EOF | |
| symfony composer require 'kocal/biome-js-bundle:*' --dev --no-interaction | |
| cat << EOF > biome.json | |
| { | |
| "files": { | |
| "includes": [ | |
| "**", | |
| "!assets/vendor/*", | |
| "!assets/controllers.json", | |
| "!public/assets/*", | |
| "!public/bundles/*", | |
| "!var/*", | |
| "!vendor/*", | |
| "!composer.json" | |
| ] | |
| }, | |
| "linter": { | |
| "rules" :{ | |
| "suspicious": { | |
| "noAssignInExpressions": "off" | |
| } | |
| } | |
| } | |
| } | |
| EOF | |
| - name: Download the Biome.js CLI | |
| working-directory: my_app | |
| run: symfony console biomejs:download | |
| - name: Run Biome CI, which should fails (but it's expected!) | |
| working-directory: my_app | |
| run: bin/biome ci . | |
| continue-on-error: true | |
| - name: Run Biome Check, and apply fixes | |
| working-directory: my_app | |
| run: bin/biome check . --write --unsafe | |
| - name: Run Biome CI, which should now pass | |
| working-directory: my_app | |
| run: bin/biome ci . |