Skip to content

Commit

Permalink
Changed the ci.yml fot gihub actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Johan Kasselman committed Aug 4, 2023
1 parent eb0cdf7 commit 9cda6c3
Showing 1 changed file with 67 additions and 67 deletions.
134 changes: 67 additions & 67 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,80 +1,80 @@
name: CI

on:
pull_request: ~
push:
branches:
- master
tags:
- '*'
pull_request: ~
push:
branches:
- master
tags:
- '*'

jobs:
coding-style:
name: Coding Style
runs-on: ubuntu-latest
steps:
- name: Setup PHP
uses: shivammathur/setup-php@2.9.0
with:
php-version: 7.4
extensions: dom, fileinfo, filter, gd, hash, intl, json, mbstring, pcre, pdo, zlib
coverage: none
coding-style:
name: Coding Style
runs-on: ubuntu-latest
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.0
extensions: dom, fileinfo, filter, gd, hash, intl, json, mbstring, pcre, pdo, zlib
coverage: none

- name: Checkout
uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v3

- name: Install the dependencies
run: composer install --no-interaction --no-suggest
- name: Check the coding style
run: vendor/bin/php-cs-fixer fix --diff --dry-run
- name: Analyze the code
run: vendor/bin/phpstan analyze src/ tests/ --level=max
- name: Install the dependencies
run: composer install --no-interaction --no-suggest
- name: Check the coding style
run: vendor/bin/php-cs-fixer fix --diff --dry-run
- name: Analyze the code
run: vendor/bin/phpstan analyze

tests:
name: PHP ${{ matrix.php }} / SF ^${{ matrix.symfony }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [7.4, 8.0]
symfony: [4.4, 5.4, 6.0]
exclude:
# Symfony 6.0 does not supports php <8.0
- php: 7.4
symfony: 6.0
steps:
- name: Setup PHP
uses: shivammathur/setup-php@2.9.0
with:
php-version: ${{ matrix.php }}
extensions: dom, fileinfo, filter, gd, hash, intl, json, mbstring, pcre, pdo_mysql, zlib
coverage: none
tests:
name: PHP ${{ matrix.php }} / SF ^${{ matrix.symfony }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [8.0, 8.1]
symfony: [5.4, 6.0, 6.1]
exclude:
# Symfony 6.1 does not support php <8.1
- php: 8.0
symfony: 6.1
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, fileinfo, filter, gd, hash, intl, json, mbstring, pcre, pdo_mysql, zlib
coverage: none

- name: Checkout
uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v3

- name: Install the dependencies
run: |
composer require symfony/framework-bundle:^${{ matrix.symfony }} symfony/http-foundation:^${{ matrix.symfony }}
composer install --no-interaction --no-suggest
- name: Run the unit tests
run: vendor/bin/phpunit --colors=always
- name: Install the dependencies
run: |
composer require symfony/framework-bundle:^${{ matrix.symfony }} symfony/http-foundation:^${{ matrix.symfony }}
composer install --no-interaction --no-suggest
- name: Run the unit tests
run: vendor/bin/phpunit --colors=always

prefer-lowest:
name: Prefer Lowest
runs-on: ubuntu-latest
steps:
- name: Setup PHP
uses: shivammathur/setup-php@2.7.0
with:
php-version: 7.4
extensions: dom, fileinfo, filter, gd, hash, intl, json, mbstring, pcre, pdo_mysql, zlib
coverage: none
prefer-lowest:
name: Prefer Lowest
runs-on: ubuntu-latest
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.0
extensions: dom, fileinfo, filter, gd, hash, intl, json, mbstring, pcre, pdo_mysql, zlib
coverage: none

- name: Checkout
uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v3

- name: Install the dependencies
run: composer update --prefer-lowest --prefer-stable --no-interaction --no-suggest
- name: Run the unit tests
run: vendor/bin/phpunit --colors=always
- name: Install the dependencies
run: composer update --prefer-lowest --prefer-stable --no-interaction --no-suggest
- name: Run the unit tests
run: vendor/bin/phpunit --colors=always

0 comments on commit 9cda6c3

Please sign in to comment.