Skip to content

Commit

Permalink
Replace Travis with GitHub actions
Browse files Browse the repository at this point in the history
  • Loading branch information
olvlvl committed Jun 1, 2021
1 parent 611ce60 commit 52119c8
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 27 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: test

on:
- push
- pull_request

jobs:
phpunit:
name: phpunit
runs-on: ubuntu-18.04
strategy:
matrix:
php-version:
- "7.2"
- "7.3"
- "7.4"
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
coverage: xdebug
php-version: "${{ matrix.php-version }}"
ini-values: memory_limit=-1, apc.enable_cli=On
tools: composer:v2
extensions: apcu
- name: Cache dependencies
uses: actions/cache@v2
with:
path: |
~/.composer/cache
vendor
key: "php-${{ matrix.php-version }}"
restore-keys: "php-${{ matrix.php-version }}"

- name: Install dependencies
run: composer install --no-interaction --no-progress

- name: Run PHPUnit
run: make test-coveralls

- name: Upload code coverage
if: ${{ matrix.php-version == '7.2' }}
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
composer global require php-coveralls/php-coveralls
php-coveralls --coverage_clover=build/logs/clover.xml -v
20 changes: 0 additions & 20 deletions .travis.yml

This file was deleted.

6 changes: 2 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ vendor:
update:
@composer update

# testing

test-dependencies: vendor

.PHONY: test
Expand All @@ -27,12 +25,12 @@ test: test-dependencies
.PHONY: test-coverage
test-coverage: test-dependencies
@mkdir -p build/coverage
@$(PHPUNIT) --coverage-html ../build/coverage --coverage-text
@$(PHPUNIT) --coverage-html build/coverage --coverage-text

.PHONY: test-coveralls
test-coveralls: test-dependencies
@mkdir -p build/logs
@$(PHPUNIT) --coverage-clover ../build/logs/clover.xml
@$(PHPUNIT) --coverage-clover build/logs/clover.xml

.PHONY: test-container
test-container:
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Facets

[![Release](https://img.shields.io/packagist/v/icanboogie/facets.svg)](https://github.com/ICanBoogie/Facets/releases)
[![Build Status](https://img.shields.io/travis/ICanBoogie/Facets/master.svg)](http://travis-ci.org/ICanBoogie/Facets)
[![Code Quality](https://img.shields.io/scrutinizer/g/ICanBoogie/Facets/master.svg)](https://scrutinizer-ci.com/g/ICanBoogie/Facets)
[![Code Coverage](https://img.shields.io/coveralls/ICanBoogie/Facets/master.svg)](https://coveralls.io/r/ICanBoogie/Facets)
[![Build Status](https://img.shields.io/github/workflow/status/ICanBoogie/Facets/test)](https://github.com/ICanBoogie/Facets/actions?query=workflow%3Atest)
[![Code Quality](https://img.shields.io/scrutinizer/g/ICanBoogie/Facets.svg)](https://scrutinizer-ci.com/g/ICanBoogie/Facets)
[![Code Coverage](https://img.shields.io/coveralls/ICanBoogie/Facets.svg)](https://coveralls.io/r/ICanBoogie/Facets)
[![Packagist](https://img.shields.io/packagist/dt/icanboogie/facets.svg)](https://packagist.org/packages/icanboogie/facets)

Together with the [icanboogie/activerecord] package, this library makes it easy to implement
Expand Down

0 comments on commit 52119c8

Please sign in to comment.