-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update GitHub build files with new syntax and PHP versions
- Loading branch information
Showing
1 changed file
with
36 additions
and
36 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,38 @@ | ||
name: Github Build | ||
on: [push, pull_request] | ||
on: [ push, pull_request ] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php: ['7.4', '7.3', '7.2', '8.0', '8.1', '8.2'] | ||
name: PHP ${{ matrix.php }} | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Install PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
coverage: xdebug | ||
- name: Report PHP version | ||
run: php -v | ||
- name: Validate composer.json and composer.lock | ||
run: composer validate | ||
- 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@v1 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: ${{ matrix.php }}-composer- | ||
- name: Install dependencies | ||
run: composer install --prefer-dist --no-progress --no-suggest | ||
- name: Run PHPStan | ||
run: composer phpstan | ||
- name: Run PHP-CS | ||
run: composer check-style | ||
- name: Run test suite | ||
run: vendor/bin/phpunit | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php: [ '7.4', '7.3', '7.2', '8.0', '8.1', '8.2', '8.3', '8.4'] | ||
name: PHP ${{ matrix.php }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
coverage: xdebug | ||
- name: Report PHP version | ||
run: php -v | ||
- name: Validate composer.json and composer.lock | ||
run: composer validate | ||
- name: Get Composer Cache Directory | ||
id: composer-cache | ||
run: echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT" | ||
- name: Cache dependencies | ||
uses: actions/cache@v4 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: ${{ matrix.php }}-composer- | ||
- name: Install dependencies | ||
run: composer install --prefer-dist --no-progress --no-suggest | ||
- name: Run PHPStan | ||
run: composer phpstan | ||
- name: Run PHP-CS | ||
run: composer check-style | ||
- name: Run test suite | ||
run: vendor/bin/phpunit |