Skip to content

Commit

Permalink
Move CI to GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
BenMorel committed Dec 14, 2020
1 parent b09b82c commit acdff65
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 19 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: CI

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

jobs:
phpunit:
name: PHPUnit
runs-on: ubuntu-latest

strategy:
matrix:
php-version:
- "7.1"
- "7.2"
- "7.3"
- "7.4"
- "8.0"

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

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: xdebug

- name: Install composer dependencies
uses: "ramsey/composer-install@v1"

- name: Run PHPUnit
run: vendor/bin/phpunit
if: ${{ matrix.php-version != '8.0' }}

- name: Run PHPUnit with coverage
run: |
mkdir -p mkdir -p build/logs
vendor/bin/phpunit --coverage-clover build/logs/clover.xml
if: ${{ matrix.php-version == '8.0' }}

- name: Upload coverage report to Coveralls
run: vendor/bin/php-coveralls --coverage_clover=build/logs/clover.xml -v
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: ${{ matrix.php-version == '8.0' }}
18 changes: 0 additions & 18 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
Expand Up @@ -4,7 +4,7 @@

A very simple HTML 5 generation library.

[![Build Status](https://secure.travis-ci.org/brick/html.svg?branch=master)](http://travis-ci.org/brick/html)
[![Build Status](https://github.com/brick/html/workflows/CI/badge.svg)](https://github.com/brick/html/actions)
[![Coverage Status](https://coveralls.io/repos/github/brick/html/badge.svg?branch=master)](https://coveralls.io/github/brick/html?branch=master)
[![Latest Stable Version](https://poser.pugx.org/brick/html/v/stable)](https://packagist.org/packages/brick/html)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](http://opensource.org/licenses/MIT)
Expand Down

0 comments on commit acdff65

Please sign in to comment.