From eaa6f1144c62e7775afca518930d307f811481be Mon Sep 17 00:00:00 2001 From: MoshchenkoBohdan Date: Wed, 20 Dec 2023 12:56:09 +0200 Subject: [PATCH] Added ci --- .github/workflows/ci.yml | 76 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..61dd000 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,76 @@ +name: PHPUnit + +on: + pull_request: + push: + branches: [ master ] + +jobs: + build: + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + php: + - '7.4' + - '8.1' + - '8.2' + symfony: + - '5.4.*' + - '6.0.*' + - '6.1.*' + - '6.3.*' + - '6.4.*' + - '7.0.*' + exclude: + - php: '7.4' + symfony: '6.0.*' # requires PHP ^8.0.2 + - php: '7.4' + symfony: '6.1.*' # requires PHP ^8.1 + - php: '7.4' + symfony: '6.3.*' # requires PHP ^8.1 + - php: '7.4' + symfony: '6.4.*' # requires PHP ^8.1 + - php: '7.4' + symfony: '7.0.*' # requires PHP ^8.2 + - php: '8.1' + symfony: '7.0.*' # requires PHP ^8.2 + + runs-on: ${{ matrix.os }} + + env: + SYMFONY: ${{ matrix.symfony }} + + steps: + - uses: actions/checkout@v2 + + - name: Install PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + ini-values: date.timezone='UTC' + tools: composer:v2,flex + + - name: Install dependencies + run: | + composer update --prefer-dist + vendor/bin/simple-phpunit install + env: + SYMFONY_REQUIRE: "${{ matrix.symfony }}" + + - name: Cs-check + run: | + vendor/bin/php-cs-fixer fix --dry-run --diff -v --ansi + + - name: psalm + run: | + vendor/bin/psalm --php-version=${{ matrix.php }} + + - name: Require doctrine/annotation + if: matrix.php == '7.4' + run: composer require doctrine/annotations --no-interaction + + - name: Test + run: | + composer validate --strict --no-check-lock + vendor/bin/simple-phpunit