Merge pull request #7 from Kocal/fix/get-latest-release #24
This file contains 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 | |
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 | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
# Minimum supported dependencies and minimum supported PHP version | |
- PHP_VERSION: '8.1' | |
COMPOSER_FLAGS: --prefer-stable --prefer-lowest | |
SYMFONY_VERSION: '6.4' | |
- PHP_VERSION: '8.2' | |
COMPOSER_FLAGS: --prefer-stable --prefer-lowest | |
SYMFONY_VERSION: '7.0' | |
# Latest 6.4 stable releases | |
- PHP_VERSION: '8.1' | |
SYMFONY_VERSION: '6.4' | |
- PHP_VERSION: '8.2' | |
SYMFONY_VERSION: '6.4' | |
- PHP_VERSION: '8.3' | |
SYMFONY_VERSION: '6.4' | |
# Latest 7.0 stable releases | |
- PHP_VERSION: '8.2' | |
SYMFONY_VERSION: '7.0' | |
- PHP_VERSION: '8.3' | |
SYMFONY_VERSION: '7.0' | |
# Highest supported PHP version with the latest Symfony version, on Windows and macOS | |
- PHP_VERSION: '8.3' | |
SYMFONY_VERSION: '7.0' | |
OS: windows-latest | |
- PHP_VERSION: '8.3' | |
SYMFONY_VERSION: '7.0' | |
OS: macos-14 | |
# Latest 7.x development releases | |
- PHP_VERSION: '8.2' | |
SYMFONY_VERSION: '7.*' | |
STABILITY: dev | |
- PHP_VERSION: '8.3' | |
SYMFONY_VERSION: '7.*' | |
STABILITY: dev | |
env: | |
SYMFONY_REQUIRE: ${{ matrix.config.SYMFONY_VERSION }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.config.PHP_VERSION }} | |
tools: symfony-cli | |
- name: Install globally Symfony Flex | |
run: | | |
symfony composer global require --no-progress --no-scripts --no-plugins symfony/flex | |
symfony composer global config --no-plugins allow-plugins.symfony/flex true | |
- name: Configure Composer minimum stability | |
if: matrix.config.STABILITY | |
run: symfony composer config minimum-stability ${{ matrix.config.STABILITY }} | |
- name: Install Composer dependencies | |
run: symfony composer update ${{ matrix.config.COMPOSER_FLAGS }} --prefer-dist --no-interaction --no-progress | |
- name: Run PHPStan | |
run: symfony php vendor/bin/phpstan analyze | |
- name: Run PHPUnit | |
run: symfony php vendor/bin/phpunit | |
e2e: | |
name: E2E | |
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: Create a new Symfony project and install kocal/biome-js-bundle | |
run: | | |
git config --global user.email "hugo@alliau.me" | |
git config --global user.name "Hugo Alliaume" | |
symfony new my_app --webapp | |
cd my_app | |
symfony composer config minimum-stability dev | |
symfony composer config repositories.biome-js-bundle '{"type":"path", "url":"../","options":{"symlink":true}}' | |
symfony composer require 'kocal/biome-js-bundle:*' --dev | |
cat << EOF > biome.json | |
{ | |
"files": { | |
"ignore": [ | |
"composer.json", | |
"assets/vendor/*", | |
"vendor/*", | |
"public/bundles/*" | |
] | |
} | |
} | |
EOF | |
- name: Run Biome CI, which should fails | |
run: symfony console biome:ci . | |
continue-on-error: true | |
working-directory: my_app | |
- name: Run Biome Check, and apply fixes | |
run: symfony console biome:check . --apply | |
working-directory: my_app | |
- name: Run Biome CI, which should now pass | |
run: symfony console biome:ci . | |
working-directory: my_app | |