ci phpunit

This commit is contained in:
Abdulmhsen B. A. A
2022-02-19 21:28:54 +03:00
parent 8dd39b7e6e
commit 3f349a55d0

View File

@@ -7,9 +7,41 @@ on:
- 'dev'
tags:
- 'v*'
pull_request:
jobs:
unit-tests:
name: PHP ${{ matrix.php }} - ${{ matrix.stability }}
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
php: [ 8.1 ]
stability: [ prefer-stable ]
steps:
- uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: pdo, mbstring, ctype, curl, sqlite3
coverage: none
tools: composer:v2
- name: get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: restore cached dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ matrix.php }}-${{ matrix.stability }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ matrix.php }}-${{ matrix.stability }}-composer-
- run: composer install --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress
- run: composer run test
publish_docker_images:
needs: unit-tests
if: github.event_name != 'pull_request'
runs-on: "ubuntu-latest"
steps:
- name: Checkout