mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-03-17 20:54:52 +08:00
59 lines
1.6 KiB
YAML
59 lines
1.6 KiB
YAML
name: Integration Test
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- develop
|
|
pull_request:
|
|
branches:
|
|
- develop
|
|
types:
|
|
- opened
|
|
- synchronize
|
|
- reopened
|
|
- ready_for_review
|
|
- review_requested
|
|
|
|
jobs:
|
|
integration:
|
|
name: Integration Test (PHP ${{ matrix.php-versions }}) (OS ${{ matrix.operating-system }})
|
|
runs-on: ${{ matrix.operating-system }}
|
|
strategy:
|
|
matrix:
|
|
operating-system: [ "ubuntu-latest", "macos-latest" ]
|
|
php-versions: [ "7.2", "7.3", "7.4", "8.0", "8.1" ]
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setup PHP
|
|
uses: "shivammathur/setup-php@v2"
|
|
with:
|
|
php-version: ${{ matrix.php-versions }}
|
|
extensions: swoole, posix, json
|
|
|
|
- name: Setup problem matchers for PHP
|
|
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
|
|
|
|
- name: Validate composer.json
|
|
run: "composer validate --strict"
|
|
|
|
- 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.json') }}
|
|
restore-keys: ${{ runner.os }}-composer-
|
|
|
|
- name: Install Composer Dependencies
|
|
run: "composer install --prefer-dist --no-progress --optimize-autoloader"
|
|
|
|
- name: Run Static Analysis
|
|
run: "composer analyse"
|
|
|
|
- name: Run PHP CS Fixer Check
|
|
run: "./vendor/bin/php-cs-fixer fix --dry-run --diff" |