From 2650a520c84554aed1adc52f7a813409a9f8d1fd Mon Sep 17 00:00:00 2001 From: Kevin Bond Date: Thu, 7 Oct 2021 11:51:07 -0400 Subject: [PATCH] [ci] use reusable workflows (#9) --- .github/workflows/ci.yml | 84 ++++++---------------------------------- 1 file changed, 12 insertions(+), 72 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 76ad505..ed049cc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,87 +8,27 @@ on: jobs: tests: - name: PHP ${{ matrix.php }} - ${{ matrix.stability }} + name: PHP ${{ matrix.php }} runs-on: ubuntu-latest strategy: matrix: php: [7.2, 7.4, 8.0] - stability: [hightest] - include: - - php: 7.2 - stability: lowest steps: - - name: Checkout code - uses: actions/checkout@v2.3.3 - - - name: Setup PHP - uses: shivammathur/setup-php@2.7.0 - with: - php-version: ${{ matrix.php }} - coverage: none - - - name: Install dependencies - uses: ramsey/composer-install@v1 + - uses: zenstruck/.github@php-test-symfony with: - dependency-versions: ${{ matrix.stability }} - - - name: Test - run: vendor/bin/simple-phpunit -v + php: ${{ matrix.php }} + phpunit: simple-phpunit code-coverage: - name: Code Coverage - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v2.3.3 - - - name: Setup PHP - uses: shivammathur/setup-php@2.7.0 - with: - php-version: 8.0 - coverage: xdebug - ini-values: xdebug.mode=coverage - - - name: Install dependencies - uses: ramsey/composer-install@v1 - - - name: Test with coverage - run: vendor/bin/simple-phpunit -v --coverage-text --coverage-clover coverage.xml - - - name: Publish coverage report to Codecov - uses: codecov/codecov-action@v1 - with: - file: ./coverage.xml + uses: zenstruck/.github/.github/workflows/php-coverage-codecov.yml@main + with: + php: 8 + phpunit: simple-phpunit composer-validate: - name: Validate composer.json - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v2.3.3 - - - name: Setup PHP - uses: shivammathur/setup-php@2.7.0 - with: - php-version: 8.0 - coverage: none - - - name: Validate composer.json - run: composer validate --strict --no-check-lock + uses: zenstruck/.github/.github/workflows/php-composer-validate.yml@main cs-check: - name: PHP Coding Standards - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v2.3.3 - - - name: Setup PHP - uses: shivammathur/setup-php@2.7.0 - with: - php-version: 7.2 - coverage: none - tools: php-cs-fixer - - - name: Check CS - run: php-cs-fixer fix --dry-run --diff + uses: zenstruck/.github/.github/workflows/php-cs-fixer.yml@main + with: + php: 7.2