diff --git a/.github/workflows/Jobs.yml b/.github/workflows/Jobs.yml new file mode 100644 index 000000000..6439bc3fb --- /dev/null +++ b/.github/workflows/Jobs.yml @@ -0,0 +1,42 @@ +name: PHP Jobs + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +permissions: + contents: read + +jobs: + build: + name: Jobs + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + php: + - "8.2" + + steps: + - uses: actions/checkout@v3 + + - name: Setup PHP + uses: shivammathur/setup-php@2.21.1 + with: + php-version: ${{ matrix.php }} + + - name: Restore Composer package cache + id: composer-cache + uses: actions/cache@v3 + with: + path: "~/.cache/composer" + key: "php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}" + restore-keys: "php-${{ matrix.php }}-composer-" + + - name: Install PHPStan Composer dependencies + run: composer install --prefer-dist --no-interaction --ignore-platform-reqs + + - name: Run PHPStan + run: vendor/bin/phpstan analyze diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml deleted file mode 100644 index ae7415cb3..000000000 --- a/.github/workflows/tests.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: Tests - -on: ['push', 'pull_request'] - -jobs: - ci: - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: 8.2 - tools: composer:v2 - coverage: xdebug - - - name: Install Dependencies - run: composer install --no-interaction --prefer-dist --optimize-autoloader - - - name: Tests - run: ./vendor/bin/pest pest.php