mirror of
https://github.com/ivuorinen/curly.git
synced 2026-02-23 17:52:03 +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
|
||||||
|
|
||||||
27
.travis.yml
27
.travis.yml
@@ -1,27 +0,0 @@
|
|||||||
language: php
|
|
||||||
|
|
||||||
env:
|
|
||||||
global:
|
|
||||||
- setup=stable
|
|
||||||
|
|
||||||
matrix:
|
|
||||||
fast_finish: true
|
|
||||||
include:
|
|
||||||
- php: 7.1
|
|
||||||
- php: 7.1
|
|
||||||
env: setup=lowest
|
|
||||||
- php: 7.2
|
|
||||||
- php: 7.2
|
|
||||||
env: setup=lowest
|
|
||||||
|
|
||||||
sudo: false
|
|
||||||
|
|
||||||
cache:
|
|
||||||
directories:
|
|
||||||
- $HOME/.composer/cache
|
|
||||||
|
|
||||||
install:
|
|
||||||
- if [[ $setup = 'stable' ]]; then travis_retry composer update --prefer-dist --no-interaction --prefer-stable --no-suggest; fi
|
|
||||||
- if [[ $setup = 'lowest' ]]; then travis_retry composer update --prefer-dist --no-interaction --prefer-lowest --prefer-stable --no-suggest; fi
|
|
||||||
|
|
||||||
script: vendor/bin/phpunit
|
|
||||||
@@ -1,28 +1,30 @@
|
|||||||
{
|
{
|
||||||
"name": "ivuorinen/curly",
|
"name": "ivuorinen/curly",
|
||||||
"description": "HTTP Curl client capable of NTLM authentication",
|
"description": "HTTP Curl client capable of NTLM authentication",
|
||||||
|
"license": "MIT",
|
||||||
|
"type": "project",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"http",
|
"http",
|
||||||
"curl",
|
"curl",
|
||||||
"ntlm"
|
"ntlm"
|
||||||
],
|
],
|
||||||
"license": "MIT",
|
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
"name": "Ismo Vuorinen",
|
"name": "Ismo Vuorinen",
|
||||||
"email": "ismo@ivuorinen.net"
|
"email": "ismo@ivuorinen.net"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"type": "project",
|
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=7.1",
|
"php": ">=7.1 || ^8",
|
||||||
"league/uri": "6.5.0",
|
|
||||||
"ext-curl": "*",
|
"ext-curl": "*",
|
||||||
"ext-zlib": "*"
|
"ext-zlib": "*",
|
||||||
|
"league/uri": "6.5.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "6.5.14",
|
"ergebnis/composer-normalize": "2.23.1",
|
||||||
"phpstan/phpstan": "1.4.6"
|
"phpstan/phpstan": "1.4.6",
|
||||||
|
"phpunit/phpunit": "8.5.23",
|
||||||
|
"roave/security-advisories": "dev-latest"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
@@ -34,8 +36,19 @@
|
|||||||
"ivuorinen\\Curly\\Tests\\": "tests/"
|
"ivuorinen\\Curly\\Tests\\": "tests/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"config": {
|
||||||
|
"allow-plugins": {
|
||||||
|
"ergebnis/composer-normalize": true
|
||||||
|
}
|
||||||
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "vendor/bin/phpunit --colors --verbose",
|
"post-update-cmd": [
|
||||||
"check": "vendor/bin/phpstan analyse src tests --level=7"
|
"@composer normalize"
|
||||||
|
],
|
||||||
|
"post-package-install": [
|
||||||
|
"@composer normalize"
|
||||||
|
],
|
||||||
|
"check": "vendor/bin/phpstan analyse src tests --level=7",
|
||||||
|
"test": "vendor/bin/phpunit --colors --verbose"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user