Skip to content

Commit

Permalink
Merge pull request zumba#30 from zumba/github-actions
Browse files Browse the repository at this point in the history
Switch to use GitHub Actions
  • Loading branch information
jonyo authored Jan 27, 2021
2 parents 144da6e + f297e54 commit a8b6d11
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 20 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Amplitude PHP CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
testsuite:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ['7.2', '7.3', '7.4']
name: PHP ${{ matrix.php-version }}
steps:
- uses: actions/checkout@v2
- name: Setup PHP with XDebug
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: xdebug
- name: Validate composer.json
run: composer validate
- name: Install dependencies
run: composer install
- name: Run test suite
run: vendor/bin/phpunit --coverage-clover build/logs/clover.xml
- name: PSR2 coverage
run: vendor/bin/phpcs --standard=psr2 src test

- name: Upload coverage results to Coveralls (only for one result)
if: matrix.php-version == '7.2'
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: vendor/bin/php-coveralls --coverage_clover=build/logs/clover.xml -v
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ composer.phar
composer.lock
/vendor/
/build/
.phpunit.result.cache
17 changes: 0 additions & 17 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Zumba amplitude-php

[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE)
[![Build Status](https://img.shields.io/travis/zumba/amplitude-php/master.svg?style=flat-square)](https://travis-ci.org/zumba/amplitude-php)
[![Code Coverage](https://img.shields.io/coveralls/zumba/amplitude-php/master.svg)](https://coveralls.io/github/zumba/amplitude-php)
![Build Status](https://github.com/zumba/amplitude-php/workflows/Amplitude%20PHP%20CI/badge.svg)
[![Coverage Status](https://coveralls.io/repos/github/zumba/amplitude-php/badge.svg?branch=master)](https://coveralls.io/github/zumba/amplitude-php?branch=master)
[![Scrutinizer](https://scrutinizer-ci.com/g/zumba/amplitude-php/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/zumba/amplitude-php/)

This is a moderately thin PHP API for [Amplitude](https://amplitude.com/), powerful enough to do what you need without getting in the way. Designed to work well in 2 main scenarios:
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
},
"require-dev": {
"phpunit/phpunit": "8.3.*",
"squizlabs/php_codesniffer": "3.4.*"
"squizlabs/php_codesniffer": "3.4.*",
"php-coveralls/php-coveralls": "^2.4"
},
"autoload": {
"psr-4": {
Expand Down
5 changes: 5 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,9 @@
<directory>./test</directory>
</testsuite>
</testsuites>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./src</directory>
</whitelist>
</filter>
</phpunit>

0 comments on commit a8b6d11

Please sign in to comment.