From 3f349a55d0421d4f2b1fd52528c8da3ec781cd27 Mon Sep 17 00:00:00 2001 From: "Abdulmhsen B. A. A" Date: Sat, 19 Feb 2022 21:28:54 +0300 Subject: [PATCH] ci phpunit --- .github/workflows/build.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 90742755..9cc07ff6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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