diff --git a/.github/workflows/style-linting.yml b/.github/workflows/style-linting.yml new file mode 100644 index 0000000..fef3c30 --- /dev/null +++ b/.github/workflows/style-linting.yml @@ -0,0 +1,82 @@ +name: style-linting + +on: + push: + pull_request: + +jobs: + pint: + runs-on: ubuntu-24.04 + timeout-minutes: 5 + + strategy: + fail-fast: true + matrix: + php: [ 8.3 ] + laravel: [ 11.* ] + + name: Laravel Pint + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Cache dependencies + uses: actions/cache@v1 + with: + path: ~/.composer/cache/files + key: dependencies-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: curl, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, iconv + coverage: none + tools: composer:v2 + + - name: Install dependencies + run: | + composer install --no-interaction --no-suggest --dev + composer dump + + - name: Execute tests + run: composer pint-check + + larastan: + runs-on: ubuntu-24.04 + timeout-minutes: 5 + + strategy: + fail-fast: true + matrix: + php: [ 8.3 ] + laravel: [ 11.* ] + + name: Larastan + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Cache dependencies + uses: actions/cache@v1 + with: + path: ~/.composer/cache/files + key: dependencies-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: curl, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, iconv + coverage: none + tools: composer:v2 + + - name: Install dependencies + run: | + composer install --no-interaction --no-suggest --dev + composer dump + + - name: Execute tests + run: composer larastan