Merge pull request #10 from pyrou/patch-5 #104
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: "Continuous Integration" | |
on: | |
pull_request: | |
push: | |
env: | |
REQUIRED_PHP_EXTENSIONS: "curl, json, zlib" | |
jobs: | |
static-code-analysis: | |
name: "Code Analysis" | |
runs-on: "ubuntu-latest" | |
strategy: | |
matrix: | |
php-version: | |
- "8.0" | |
- "8.1" | |
laravel-version: | |
- "^9" | |
- "^10" | |
composer-flags: | |
- "" | |
- "--prefer-lowest" | |
exclude: | |
# Laravel 10.x doesn't support PHP 8.0. | |
- php-version: 8.0 | |
laravel-version: ^10 | |
# Older dev-tools don't properly support PHP 8.1. | |
- php-version: 8.1 | |
composer-flags: --prefer-lowest | |
steps: | |
- name: "Checkout" | |
uses: "actions/[email protected]" | |
- name: "Install PHP with extensions" | |
uses: "shivammathur/[email protected]" | |
with: | |
coverage: "none" | |
extensions: "${{ env.REQUIRED_PHP_EXTENSIONS }}" | |
php-version: "${{ matrix.php-version }}" | |
- name: "Cache dependencies installed with composer" | |
uses: "actions/[email protected]" | |
with: | |
path: "~/.composer/cache" | |
key: "php-${{ matrix.php-version }}-composer-${{ matrix.laravel-version }}" | |
restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.laravel-version }}-" | |
- name: "Install dependencies with composer" | |
run: "composer require illuminate/contracts:${{ matrix.laravel-version }} --no-interaction --prefer-dist ${{ matrix.composer-flags }}" | |
- name: "Install dependencies with yarn" | |
uses: borales/[email protected] | |
with: | |
cmd: install | |
- name: "Run prettier" | |
uses: borales/[email protected] | |
with: | |
cmd: "prettier --check src tests" | |
- name: "Run psalm" | |
run: "vendor/bin/psalm --php-version=${{ matrix.php-version }}" | |
- name: "Run phpunit" | |
run: "vendor/bin/phpunit" |