From c5dd7719c0e072576366c5e4ca955262c51fe7b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Bundyra?= Date: Fri, 1 Dec 2023 22:04:52 +0000 Subject: [PATCH] chore: Update workflows --- .github/workflows/coding-standards.yml | 26 +++++++++++++++++++++++ .github/workflows/phpmd.yml | 26 +++++++++++++++++++++++ .github/workflows/test-flight.yml | 29 ++++++++++++++++++++++++++ .github/workflows/tests.yml | 16 ++------------ 4 files changed, 83 insertions(+), 14 deletions(-) create mode 100644 .github/workflows/coding-standards.yml create mode 100644 .github/workflows/phpmd.yml create mode 100644 .github/workflows/test-flight.yml diff --git a/.github/workflows/coding-standards.yml b/.github/workflows/coding-standards.yml new file mode 100644 index 0000000..52cc8ac --- /dev/null +++ b/.github/workflows/coding-standards.yml @@ -0,0 +1,26 @@ +name: "Check Coding Standards" + +on: + pull_request: + +jobs: + coding-standards: + name: "Check Coding Standards" + + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: "7.4" + tools: composer:v2, cs2pr + + - name: Install dependencies + run: composer require phpcsstandards/php_codesniffer --no-interaction --no-progress + + - name: "Run phpcs" + run: vendor/bin/phpcs -q --standard=PSR2 classes/ tests/ --report=checkstyle | cs2pr diff --git a/.github/workflows/phpmd.yml b/.github/workflows/phpmd.yml new file mode 100644 index 0000000..4854690 --- /dev/null +++ b/.github/workflows/phpmd.yml @@ -0,0 +1,26 @@ +name: "Check phpmd" + +on: + pull_request: + +jobs: + coding-standards: + name: "Check phpmd" + + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: "7.4" + tools: composer:v2 + + - name: Install dependencies + run: composer require phpmd/phpmd --no-interaction --no-progress + + - name: Run phpmd + run: vendor/bin/phpmd classes/ text cleancode,codesize,controversial,design,naming,unusedcode diff --git a/.github/workflows/test-flight.yml b/.github/workflows/test-flight.yml new file mode 100644 index 0000000..de93673 --- /dev/null +++ b/.github/workflows/test-flight.yml @@ -0,0 +1,29 @@ +name: "Check test-flight" + +on: + pull_request: + +jobs: + coding-standards: + name: "Check test-flight" + + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: "7.4" + tools: composer:v2 + ini-values: "zend.assertions=1" + + - name: Install dependencies + run: composer require cundd/test-flight --no-interaction --no-progress + + - name: Run test-flight + run: | + vendor/bin/test-flight README.md + vendor/bin/test-flight classes/ diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2204834..b593855 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -127,7 +127,7 @@ jobs: name: Mockery ${{ matrix.mockery-version }} on PHP ${{ matrix.php-version }} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install PHP uses: shivammathur/setup-php@v2 @@ -136,19 +136,7 @@ jobs: ini-values: zend.assertions=1 - name: Install Dependencies - run: composer require mockery/mockery:~${{ matrix.mockery-version }} squizlabs/php_codesniffer phpmd/phpmd cundd/test-flight + run: composer require mockery/mockery:~${{ matrix.mockery-version }} --no-interaction --no-progress - name: PHPUnit run: vendor/bin/phpunit - - - name: Test Flight - if: matrix.php-version != '8.1' && matrix.php-version != '8.2' && matrix.php-version != '8.3' - run: | - vendor/bin/test-flight README.md - vendor/bin/test-flight classes/ - - - name: PHPCS - run: vendor/bin/phpcs --standard=PSR2 classes/ tests/ - - - name: PHPMD - run: vendor/bin/phpmd classes/ text cleancode,codesize,controversial,design,naming,unusedcode