2020-10-01 02:35:21 +02:00
|
|
|
name: "unit tests"
|
|
|
|
|
|
|
|
on: ["pull_request", "push"]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
unit-tests:
|
|
|
|
name: "unit tests"
|
|
|
|
|
|
|
|
runs-on: ${{ matrix.operating-system }}
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
dependencies:
|
|
|
|
- "highest"
|
|
|
|
php-version:
|
|
|
|
- "7.4"
|
2020-10-07 07:47:35 +02:00
|
|
|
- "8.0"
|
2020-10-01 02:35:21 +02:00
|
|
|
operating-system:
|
|
|
|
- "ubuntu-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 }}-${{ matrix.dependencies }}"
|
|
|
|
restore-keys: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}"
|
|
|
|
|
2020-10-07 07:47:35 +02:00
|
|
|
- name: "installing dependencies"
|
|
|
|
run: "composer install --no-interaction --no-progress --ignore-platform-req php"
|
2020-10-01 02:35:21 +02:00
|
|
|
|
|
|
|
- name: "running unit tests ( phpunit )"
|
|
|
|
run: "composer test:unit"
|