Add Static Analysis workflow and badges to README.md #5
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: Run Tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Cache dependencies | |
uses: actions/cache@v4 | |
with: | |
path: vendor | |
key: dependencies-composer-${{ hashFiles('composer.json') }} | |
- name: Set up PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.2' | |
extensions: mbstring, pdo, sqlite | |
ini-values: post_max_size=256M, upload_max_filesize=256M | |
coverage: none | |
- name: Install Composer dependencies | |
run: composer install --prefer-dist --no-progress | |
- name: Run tests | |
run: vendor/bin/phpunit |