Skip to content

Commit

Permalink
Pushing GitHub Actions configuration to the repository. README update…
Browse files Browse the repository at this point in the history
…d with new Codecov and GitHub Actions build information.
  • Loading branch information
allebb committed Dec 22, 2020
1 parent a796380 commit 93a529b
Show file tree
Hide file tree
Showing 6 changed files with 712 additions and 146 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: build

on: [ push, pull_request ]

jobs:
build-test:
name: Clip (PHP ${{ matrix.php-versions }})
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
php-versions: [ '7.2', '7.3', '7.4' ]

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: posix
coverage: xdebug

- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

#- name: Cache composer dependencies
# uses: actions/cache@v2
# with:
# path: ${{ steps.composer-cache.outputs.dir }}
# # Use composer.json for key, if composer.lock is not committed.
# # key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
# restore-keys: ${{ runner.os }}-composer-

- name: Install Composer dependencies
run: composer install --no-suggest --no-progress --prefer-dist --optimize-autoloader

#- name: PHPUnit Tests
# uses: php-actions/phpunit@v1
# with:
# bootstrap: vendor/autoload.php
# configuration: phpunit.xml
# args: --coverage-text
# memory_limit: 256M

- name: PHPUnit Tests
run: vendor/bin/phpunit --coverage-clover=coverage.xml

- name: Upload code coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
flags: tests
name: codedev-umbrella
yml: ./codedev.yml
fail_ci_if_error: true

# For code coverage report we are uploading our code coverage report to scrutinizer
- name: Downloading scrutinizer ocular.phar
run: wget https://scrutinizer-ci.com/ocular.phar

# Uploading reports for analysis
- name: Uploading code coverage to scrutinize
run: php ocular.phar code-coverage:upload --format=php-clover coverage.xml
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/nbproject
/vendor
/report
.idea
.DS_Store
Thumbs.db
19 changes: 0 additions & 19 deletions .travis.yml

This file was deleted.

24 changes: 10 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
# Clip

[![Build](https://github.com/allebb/clip/workflows/build/badge.svg)](https://github.com/allebb/clip/actions)
[![Code Coverage](https://codecov.io/gh/allebb/clip/branch/master/graph/badge.svg)](https://codecov.io/gh/allebb/clip)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/allebb/clip/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/allebb/clip/?branch=master)
[![Code Climate](https://codeclimate.com/github/allebb/clip/badges/gpa.svg)](https://codeclimate.com/github/allebb/clip)
[![Latest Stable Version](https://poser.pugx.org/ballen/clip/v/stable)](https://packagist.org/packages/ballen/cartographer)
[![Latest Unstable Version](https://poser.pugx.org/ballen/clip/v/unstable)](https://packagist.org/packages/ballen/clip)
[![License](https://poser.pugx.org/ballen/clip/license)](https://packagist.org/packages/ballen/clip)

A super-lightweight package for speeding up development of PHP console (CLI) applications.

Requirements
------------

This library requires PHP 5.5+
This library requires PHP 7.2+

License
-------

This client library is released under the MIT license, a [copy of the license](https://github.com/bobsta63/clip/blob/master/LICENSE) is provided in this package.
This client library is released under the MIT license, a [copy of the license](https://github.com/allebb/clip/blob/master/LICENSE) is provided in this package.

Setup
-----
Expand All @@ -19,18 +27,6 @@ To install the package into your project (assuming you are using the Composer pa

```composer require ballen/clip```

Alternatively you can manually add this library to your project using the following steps, simply edit your project's composer.json file and add the following lines (or update your existing require section with the library like so):

```json
"require": {
"ballen/clip": "^2.0"
}
```

Then install the package like so:

```composer update ballen/clip```

Support
-------

Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
"issues": "https://github.com/bobsta63/clip/issues"
},
"require": {
"php": ">=5.5.0",
"php": ">=7.2.0",
"ballen/collection": "^1.0"
},
"require-dev": {
"phpunit/phpunit": "4.3.*"
"phpunit/phpunit": "4.8.*"
},
"suggest": {
"ext-posix": "Enables execution as super user (root) checking."
Expand Down
Loading

0 comments on commit 93a529b

Please sign in to comment.