From be0a8ed0bafae5667d7c8a841ab34b8af953017b Mon Sep 17 00:00:00 2001 From: David Lombera Date: Tue, 11 Jul 2023 15:25:01 -0600 Subject: [PATCH] add formats workflow --- .github/workflows/formats.yml | 44 +++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/formats.yml diff --git a/.github/workflows/formats.yml b/.github/workflows/formats.yml new file mode 100644 index 0000000..7fb67fa --- /dev/null +++ b/.github/workflows/formats.yml @@ -0,0 +1,44 @@ +name: Formats + +on: + push: + branches: ['main'] + pull_request: + branches: ['main'] + +permissions: + contents: read + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + fail-fast: true + matrix: + php: [8.1, 8.2] + + name: PHP ${{ matrix.php }} + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup PHP Action + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: curl, xml, mbstring, zip + coverage: none + + - name: Validate composer.json and composer.lock + run: composer validate --strict + + - name: Install dependencies + run: composer install --prefer-dist --no-progress + + - name: Coding style checks + run: vendor/bin/phpcs + + - name: Static analysis checks + run: vendor/bin/phpcs