Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 72 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: CI

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

workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- php-versions: '5.6'
phpunit-versions: '5.7.27'
- php-versions: '7.0'
phpunit-versions: '6.5.14'
- php-versions: '7.1'
phpunit-versions: '7.5.20'
- php-versions: '7.2'
phpunit-versions: '7.5.20'
- php-versions: '7.3'
phpunit-versions: '7.5.20'
- php-versions: '7.4'
phpunit-versions: '7.5.20'
# - php-versions: '8.0'
# phpunit-versions: '9.5.1'

name: PHP ${{ matrix.php-versions }}, PHPUnit ${{ matrix.phpunit-versions }}
steps:
- name: Checkout
uses: actions/checkout@v2

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

- 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@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install Dependencies
run: composer update --prefer-dist --no-interaction

- name: Run Tests
run: |
mkdir -p build/logs
phpunit --coverage-clover build/logs/clover.xml

- name: Downloading Scrutinizer CI binary
run: wget https://scrutinizer-ci.com/ocular.phar

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1

- name: Uploading code coverage to Scrutinizer CI
run: php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml

30 changes: 0 additions & 30 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,6 +1,6 @@
# Code-Insight

[![Build Status](https://travis-ci.org/console-helpers/code-insight.svg?branch=master)](https://travis-ci.org/console-helpers/code-insight)
[![CI](https://github.com/console-helpers/code-insight/workflows/CI/badge.svg)](https://github.com/console-helpers/code-insight/actions?query=workflow%3ACI)
[![codecov](https://codecov.io/gh/console-helpers/code-insight/branch/master/graph/badge.svg)](https://codecov.io/gh/console-helpers/code-insight)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/console-helpers/code-insight/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/console-helpers/code-insight/?branch=master)

Expand Down