Skip to content

Commit

Permalink
Merge e255a7f into 81d484e
Browse files Browse the repository at this point in the history
  • Loading branch information
hjerichen committed Jan 30, 2021
2 parents 81d484e + e255a7f commit 5f12f66
Show file tree
Hide file tree
Showing 9 changed files with 104 additions and 2,756 deletions.
3 changes: 0 additions & 3 deletions .coveralls.yml

This file was deleted.

94 changes: 94 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: Continuous Integration

on:
- pull_request
- push

jobs:

test:
runs-on: ubuntu-18.04

strategy:
matrix:
php:
- 7.2
- 7.3
- 7.4
dependencies:
- "--prefer-lowest"
- ""

name: PHP ${{ matrix.php }} Test ${{ matrix.dependencies }}

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

- name: Install PHP
uses: shivammathur/setup-php@2.9.0
with:
php-version: ${{ matrix.php }}
coverage: none

- name: Validate composer.json
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: ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ matrix.dependencies }}-
env:
DEPENDENCIES: ${{ matrix.dependencies}}

- name: Install Dependencies
run: composer update ${DEPENDENCIES}
env:
DEPENDENCIES: ${{ matrix.dependencies}}

- name: Run Tests
run: vendor/bin/phpunit

coverage:
runs-on: ubuntu-18.04
name: Code Coverage

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

- name: Install PHP
uses: shivammathur/setup-php@2.9.0
with:
php-version: 7.4
coverage: pcov

- 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: ${{ runner.os }}-coverage-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-coverage-composer-

- name: Install Dependencies
run: composer update

- name: Code coverage
run: vendor/bin/phpunit --coverage-clover build/logs/clover.xml

- name: Upload coverage results to Coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
composer global require php-coveralls/php-coveralls
php-coveralls --coverage_clover=build/logs/clover.xml -v
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
/logs
/vendor

/composer.lock

/.idea/*
!/.idea/codeStyles/
!/.idea/dictionaries/
!/.idea/encodings.xml
!/.idea/inspectionProfiles/
!/.idea/inspectionProfiles/
11 changes: 0 additions & 11 deletions .phpunit.xml

This file was deleted.

16 changes: 0 additions & 16 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Build Status](https://travis-ci.org/hjerichen/collections.svg?branch=master)](https://travis-ci.org/hjerichen/collections)
[![Continuous Integration](https://github.com/hjerichen/collections/workflows/Continuous%20Integration/badge.svg?branch=master)](https://github.com/hjerichen/collections/actions)
[![Coverage Status](https://coveralls.io/repos/github/hjerichen/collections/badge.svg?branch=master)](https://coveralls.io/github/hjerichen/collections?branch=master)

# Collections
Expand Down
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
},
"require-dev": {
"roave/security-advisories": "dev-master",
"phpunit/phpunit": "^8.0",
"php-coveralls/php-coveralls": "^2.1"
"phpunit/phpunit": "^8.0"
}
}

0 comments on commit 5f12f66

Please sign in to comment.