psalm-plugin/.github/workflows/unit-tests.yml
Saif Eddin Gmati cd223caa18 Initial commit
2021-03-26 10:10:46 +01:00

49 lines
1.1 KiB
YAML

name: "unit tests"
on:
pull_request: ~
push: ~
jobs:
unit-tests:
name: "unit tests"
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
php-version:
- "7.4"
- "8.0"
operating-system:
- "macos-latest"
- "ubuntu-latest"
- "windows-latest"
steps:
- name: "checkout"
uses: "actions/checkout@v2"
- name: "installing PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php-version }}"
ini-values: memory_limit=-1
tools: composer:v2, cs2pr
extensions: bcmath, mbstring, intl, sodium, json
- name: "caching dependencies"
uses: "actions/cache@v2"
with:
path: |
~/.composer/cache
vendor
key: "php-${{ matrix.php-version }}"
restore-keys: "php-${{ matrix.php-version }}"
- name: "installing dependencies"
run: "composer install --no-interaction --no-progress --ignore-platform-req php"
- name: "running unit tests ( phpunit )"
run: "php vendor/bin/phpunit"