ci phpunit
This commit is contained in:
32
.github/workflows/build.yml
vendored
32
.github/workflows/build.yml
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user