mirror of
https://github.com/holidayapi/holidayapi-php.git
synced 2025-06-21 12:16:31 +00:00
build: swap travis for github actions
This commit is contained in:
parent
3ab9ffd19f
commit
b157b675ce
6 changed files with 54 additions and 45 deletions
|
@ -1 +0,0 @@
|
||||||
service_name: travis-ci
|
|
29
.github/workflows/test.yml
vendored
Normal file
29
.github/workflows/test.yml
vendored
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
name: Test
|
||||||
|
on: [push, pull_request]
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
name: Test PHP ${{ matrix.php-version }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
php-version: ['5.3', '5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4']
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
|
with:
|
||||||
|
php-version: ${{ matrix.php-version }}
|
||||||
|
- name: PHP Version
|
||||||
|
run: php --version
|
||||||
|
- name: Composer Version
|
||||||
|
run: composer --version
|
||||||
|
- name: Install Dependencies
|
||||||
|
run: COMPOSER_MEMORY_LIMIT=-1 composer install
|
||||||
|
- name: Run Tests
|
||||||
|
run: vendor/bin/phpunit --coverage-clover ./coverage.xml
|
||||||
|
- name: Upload Coverage
|
||||||
|
if: ${{ matrix.php-version == '7.4' }}
|
||||||
|
uses: codecov/codecov-action@v1
|
||||||
|
with:
|
||||||
|
file: ./coverage.xml
|
40
.travis.yml
40
.travis.yml
|
@ -1,40 +0,0 @@
|
||||||
language: php
|
|
||||||
dist: bionic
|
|
||||||
sudo: required
|
|
||||||
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- php: 5.3
|
|
||||||
dist: precise
|
|
||||||
- php: 5.4
|
|
||||||
dist: trusty
|
|
||||||
- php: 5.5
|
|
||||||
dist: trusty
|
|
||||||
- php: 5.6
|
|
||||||
dist: trusty
|
|
||||||
- php: 7.0
|
|
||||||
dist: xenial
|
|
||||||
- php: 7.1
|
|
||||||
- php: 7.2
|
|
||||||
- php: 7.3
|
|
||||||
- php: 7.4
|
|
||||||
env: COVERAGE=true
|
|
||||||
- php: nightly
|
|
||||||
allow_failures:
|
|
||||||
- php: nightly
|
|
||||||
|
|
||||||
install:
|
|
||||||
- php --version
|
|
||||||
- composer install
|
|
||||||
|
|
||||||
before_script:
|
|
||||||
- mkdir -p build/logs
|
|
||||||
|
|
||||||
script:
|
|
||||||
- vendor/bin/phpunit --coverage-clover build/logs/clover.xml
|
|
||||||
|
|
||||||
after_success:
|
|
||||||
- |
|
|
||||||
if [[ $COVERAGE ]]; then
|
|
||||||
travis_retry php vendor/bin/php-coveralls --config .coveralls.yml -v
|
|
||||||
fi
|
|
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
[](https://github.com/holidayapi/holidayapi-php/blob/master/LICENSE)
|
[](https://github.com/holidayapi/holidayapi-php/blob/master/LICENSE)
|
||||||

|

|
||||||

|
[](https://github.com/joshtronic/holidayapi-php/actions)
|
||||||
[](https://coveralls.io/github/holidayapi/holidayapi-php?branch=master)
|
[](https://codecov.io/gh/joshtronic/holidayapi-php)
|
||||||
|
|
||||||
Official PHP library for [Holiday API](https://holidayapi.com) providing quick
|
Official PHP library for [Holiday API](https://holidayapi.com) providing quick
|
||||||
and easy access to holiday information from applications written in PHP.
|
and easy access to holiday information from applications written in PHP.
|
||||||
|
|
20
codecov.yml
Normal file
20
codecov.yml
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
codecov:
|
||||||
|
require_ci_to_pass: yes
|
||||||
|
|
||||||
|
coverage:
|
||||||
|
precision: 2
|
||||||
|
round: down
|
||||||
|
range: "70...100"
|
||||||
|
|
||||||
|
parsers:
|
||||||
|
gcov:
|
||||||
|
branch_detection:
|
||||||
|
conditional: yes
|
||||||
|
loop: yes
|
||||||
|
method: no
|
||||||
|
macro: no
|
||||||
|
|
||||||
|
comment:
|
||||||
|
layout: "reach,diff,flags,tree"
|
||||||
|
behavior: default
|
||||||
|
require_changes: no
|
|
@ -20,10 +20,11 @@
|
||||||
"php": ">=5.3"
|
"php": ">=5.3"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"php-coveralls/php-coveralls": ">=1",
|
|
||||||
"phpunit/phpunit": ">=4"
|
"phpunit/phpunit": ">=4"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": { "HolidayAPI\\": "src/" }
|
"psr-4": {
|
||||||
|
"HolidayAPI\\": "src/"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue