OXDEV-7758: Add schema trigger workflow #827
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [push, pull_request] | |
env: | |
DEFAULT_COMPOSER_FLAGS: --no-interaction --no-ansi --no-progress --no-suggest --prefer-dist --no-plugins | |
jobs: | |
build: | |
runs-on: Ubuntu-latest | |
strategy: | |
matrix: | |
php: | |
- "7.4" | |
- "8.0" | |
env: | |
- DEPENDENCIES="" | |
- DEPENDENCIES=" --prefer-lowest" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
coverage: xdebug | |
- name: Get composer cache directory | |
id: composer-cache | |
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | |
- name: Cache dependencies | |
uses: actions/cache@v2 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
restore-keys: ${{ runner.os }}-composer- | |
- name: Install dependencies | |
run: composer update $DEFAULT_COMPOSER_FLAGS $DEPENDENCIES | |
- name: Generated Unified Namespace | |
run: ./vendor/bin/oe-eshop-unified_namespace_generator | |
- name: Syntax Test | |
if: ${{ matrix.php == '8.0' && env.DEPENDENCIES == '' }} | |
run: composer test:syntax | |
- name: Lint Test | |
if: ${{ matrix.php == '8.0' && env.DEPENDENCIES == '' }} | |
run: composer test:lint | |
- name: Unit Tests | |
run: composer test:unit | |
- name: Static Analyzer | |
if: ${{ matrix.php == '8.0' && env.DEPENDENCIES == '' }} | |
run: composer test:static | |
- name: Deptrac Analyzer | |
if: ${{ matrix.php == '8.0' && env.DEPENDENCIES == '' }} | |
run: composer test:deptrac |