Skip to content

Extends the default Schedule Run Command #74

Extends the default Schedule Run Command

Extends the default Schedule Run Command #74

Workflow file for this run

name: Build
on:
push:
paths-ignore: ['*.md']
pull_request:
paths-ignore: ['*.md']
branches: [ master, main ]
jobs:
analysis:
runs-on: ubuntu-latest
strategy:
matrix:
php: [8.2]
steps:
- uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv
coverage: none
- name: Cache composer dependencies
uses: actions/cache@v2
env:
cache-name: laravel-gcr-worker-analysis
with:
path: ~/.composer
key: php-${{ matrix.php }}-build-${{ env.cache-name }}-${{ hashFiles('**/composer.json') }}
restore-keys: |
php-${{ matrix.php }}-build-${{ env.cache-name }}-
php-${{ matrix.php }}-build-
php-${{ matrix.php }}-
- name: Install composer dependencies
run: composer install --no-interaction --prefer-dist
- name: Run static analysis
run: composer analyse
test:
name: Test (PHP ${{ matrix.php }})
needs: [ analysis ]
runs-on: ubuntu-latest
strategy:
matrix:
php: [ 7.4, 8.0, 8.1 ]
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv
coverage: none
- name: Cache composer dependencies
uses: actions/cache@v2
env:
cache-name: laravel-gcr-worker-test
with:
path: ~/.composer
key: php-${{ matrix.php }}-build-${{ env.cache-name }}-${{ hashFiles('**/composer.json') }}
restore-keys: |
php-${{ matrix.php }}-build-${{ env.cache-name }}-
php-${{ matrix.php }}-build-
php-${{ matrix.php }}-
- name: Install composer dependencies
run: composer install --no-interaction --prefer-dist
- name: Run PHPUnit tests and generate code coverage
run: |
vendor/bin/phpunit
test-coverage:
name: Test (PHP ${{ matrix.php }})
needs: [ analysis ]
runs-on: ubuntu-latest
strategy:
matrix:
php: [ 8.2 ]
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv
- name: Cache composer dependencies
uses: actions/cache@v2
env:
cache-name: laravel-gcr-worker-test
with:
path: ~/.composer
key: php-${{ matrix.php }}-build-${{ env.cache-name }}-${{ hashFiles('**/composer.json') }}
restore-keys: |
php-${{ matrix.php }}-build-${{ env.cache-name }}-
php-${{ matrix.php }}-build-
php-${{ matrix.php }}-
- name: Install composer dependencies
run: composer install --no-interaction --prefer-dist
- name: Run PHPUnit tests and generate code coverage
run: |
vendor/bin/phpunit --coverage-clover=clover.xml
- name: Upload code coverage results
run: bash <(curl -s https://codecov.io/bash)