feat: init workflow #29
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |