mirror of
https://github.com/ivuorinen/curly.git
synced 2026-01-26 11:33:59 +00:00
GitHub Workflows, and now available for PHP 8
This commit is contained in:
32
.github/workflows/composer-diff.yml
vendored
Normal file
32
.github/workflows/composer-diff.yml
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
name: Composer Diff
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- 'composer.lock'
|
||||
jobs:
|
||||
composer-diff:
|
||||
name: Composer Diff
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0 # Required to make it possible to compare with PR base branch
|
||||
|
||||
- name: Generate composer diff
|
||||
id: composer_diff # To reference the output in comment
|
||||
uses: IonBazan/composer-diff-action@v1
|
||||
|
||||
- uses: marocchino/sticky-pull-request-comment@v2
|
||||
# An empty diff result will break this action.
|
||||
if: ${{ steps.composer_diff.outputs.composer_diff_exit_code != 0 }}
|
||||
with:
|
||||
header: composer-diff # Creates a collapsed comment with the report
|
||||
message: |
|
||||
<details>
|
||||
<summary>Composer package changes</summary>
|
||||
|
||||
${{ steps.composer_diff.outputs.composer_diff }}
|
||||
|
||||
</details>
|
||||
|
||||
50
.github/workflows/php.yml
vendored
Normal file
50
.github/workflows/php.yml
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
name: PHP Composer
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ${{ matrix.operating-system }}
|
||||
continue-on-error: true
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
operating-system: ['ubuntu-latest']
|
||||
php-versions: ['7.4', '8.0', '8.1']
|
||||
phpunit-versions: ['latest']
|
||||
|
||||
steps:
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
extensions: mbstring, intl, fileinfo
|
||||
ini-values: post_max_size=256M, max_execution_time=180
|
||||
coverage: xdebug
|
||||
tools: php-cs-fixer, phpunit:${{ matrix.phpunit-versions }}
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Validate composer.json and composer.lock
|
||||
run: composer validate
|
||||
|
||||
- name: Cache Composer packages
|
||||
id: composer-cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: vendor
|
||||
key: ${{ runner.os }}-php-${{ matrix.php-versions }}-${{ hashFiles('**/composer.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-php-${{ matrix.php-versions }}-
|
||||
${{ runner.os }}-php-
|
||||
|
||||
- name: Install dependencies
|
||||
run: composer install --prefer-dist --no-progress
|
||||
|
||||
- name: Run test suite
|
||||
run: composer test
|
||||
|
||||
Reference in New Issue
Block a user