Skip to content

Commit deca1aa

Browse files
Merge pull request #239 from Nexmo/github-actions
Added github action to handle PHPUnit
2 parents 2db549b + d47c8a6 commit deca1aa

File tree

2 files changed

+48
-1
lines changed

2 files changed

+48
-1
lines changed

.github/workflows/build.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: build
2+
on: [push, pull_request]
3+
jobs:
4+
build:
5+
runs-on:
6+
- ubuntu-latest
7+
strategy:
8+
matrix:
9+
php: ['7.1', '7.2', '7.3', '7.4']
10+
steps:
11+
- name: Configure Git
12+
if: ${{ matrix.os == 'windows-latest' }}
13+
run: |
14+
git config --system core.autocrlf false
15+
git config --ystem core.eol lf
16+
17+
- name: Checkout
18+
uses: actions/checkout@v2
19+
20+
- name: Setup PHP
21+
uses: shivammathur/setup-php@v2
22+
with:
23+
php-version: ${{ matrix.php }}
24+
extensions: json
25+
tools: composer
26+
coverage: xdebug
27+
28+
- name: Get Composer cache directory
29+
id: composercache
30+
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
31+
32+
- name: Cache Composer dependencies
33+
uses: actions/cache@v2
34+
with:
35+
path: ${{ steps.composercache.outputs.dir }}
36+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
37+
restore-keys: ${{ runner.os }}-composer-
38+
39+
- name: Install dependencies
40+
run: composer install --no-interaction --prefer-dist --no-progress --no-suggest ${{ matrix.composer-options }}
41+
42+
- name: Analyze & test
43+
run: |
44+
vendor/bin/phpunit -v --configuration ./phpunit.xml.dist --coverage-clover=coverage.xml
45+
46+
- name: Run codecov
47+
uses: codecov/codecov-action@v1

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Client Library for PHP
22
============================
33
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](CODE_OF_CONDUCT.md)
4-
[![Build Status](https://api.travis-ci.org/Nexmo/nexmo-php.svg?branch=master)](https://travis-ci.org/Nexmo/nexmo-php)
4+
[![Build Status](https://github.com/nexmo/nexmo-php/workflows/build/badge.svg?branch=master)](https://github.com/Nexmo/nexmo-php/actions?query=workflow%3Abuild)
55
[![Latest Stable Version](https://poser.pugx.org/nexmo/client/v/stable)](https://packagist.org/packages/nexmo/client)
66
[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE.txt)
77
[![codecov](https://codecov.io/gh/Nexmo/nexmo-php/branch/master/graph/badge.svg)](https://codecov.io/gh/Nexmo/nexmo-php)

0 commit comments

Comments
 (0)