Skip to content

Commit c4c93d1

Browse files
authored
Move from Travis CI to GitHub Actions (#5)
Move from Travis CI to GitHub Actions
1 parent cde8df8 commit c4c93d1

File tree

11 files changed

+1226
-144
lines changed

11 files changed

+1226
-144
lines changed

.github/workflows/tests.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
defaults:
8+
run:
9+
shell: bash
10+
11+
jobs:
12+
13+
tests:
14+
name: Tests (PHP ${{ matrix.php }})
15+
runs-on: Ubuntu-20.04
16+
17+
strategy:
18+
matrix:
19+
php: [ '5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0']
20+
fail-fast: false
21+
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v2
25+
with:
26+
fetch-depth: 2
27+
28+
- name: Setup PHP
29+
uses: shivammathur/setup-php@v2
30+
with:
31+
coverage: "xdebug"
32+
php-version: "${{ matrix.php }}"
33+
tools: composer
34+
35+
- name: Install dependencies
36+
run: |
37+
composer update --prefer-dist --no-interaction
38+
39+
- name: Run tests
40+
run: |
41+
vendor/bin/phpunit -v --coverage-clover=coverage.clover
42+
43+
- name: Upload Coverage to CodeCov
44+
uses: codecov/codecov-action@v2
45+
46+
- name: Upload Coverage to Scrutinizer CI (PHP < 8.0)
47+
if: "${{ matrix.php < '8.0' }}"
48+
run: |
49+
wget https://scrutinizer-ci.com/ocular.phar
50+
php ocular.phar code-coverage:upload --repository=g/console-helpers/db-migration --format=php-clover coverage.clover
51+
52+
- name: Upload Coverage to Scrutinizer CI (PHP >= 8.0)
53+
if: "${{ matrix.php >= '8.0' }}"
54+
run: |
55+
composer require scrutinizer/ocular
56+
vendor/bin/ocular code-coverage:upload --repository=g/console-helpers/db-migration --format=php-clover coverage.clover

.travis.yml

Lines changed: 0 additions & 47 deletions
This file was deleted.

composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@
1010
}
1111
],
1212
"require": {
13-
"php": ">=5.3.7",
13+
"php": ">=5.4",
1414
"aura/sql": "^2.5 | ^3.0"
1515
},
1616
"require-dev": {
17-
"aik099/coding-standard": "dev-master"
17+
"aik099/coding-standard": "dev-master",
18+
"yoast/phpunit-polyfills": "^1.0"
1819
},
1920
"autoload": {
2021
"psr-4": {

0 commit comments

Comments
 (0)