Skip to content

feat: init workflow #31

feat: init workflow

feat: init workflow #31

Workflow file for this run

name: static analysis
on:
push:
branches: [ main ]
pull_request:
permissions:
contents: read
jobs:
phpstan:
name: Static Analysis
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]')"
steps:
- name: Checkout the code
uses: actions/checkout@v4
- name: Get composer cache directory path
id: composercache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache composer
uses: actions/cache@v3
with:
path: ${{ steps.composercache.outputs.dir }}
key: dependencies-composer-${{ hashFiles('composer.json') }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
tools: composer:v2
coverage: none
- name: Install dependencies
run: composer update --prefer-dist --no-interaction --no-progress
- name: Execute type checking
run: ./vendor/bin/phpstan analyse --error-format=github