Skip to content

Commit 994cee5

Browse files
committed
Added GitHub Actions CI workflow.
Removed Travis config.
1 parent 30b7093 commit 994cee5

File tree

2 files changed

+61
-32
lines changed

2 files changed

+61
-32
lines changed

.github/workflows/CI.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
Test:
9+
runs-on: ubuntu-latest
10+
11+
strategy:
12+
matrix:
13+
php:
14+
- 7.3
15+
- 7.4
16+
- 8.0
17+
dependencies:
18+
- hi
19+
- lo
20+
21+
steps:
22+
- uses: actions/checkout@v2
23+
24+
- name: Setup PHP ${{ matrix.php }}
25+
uses: shivammathur/setup-php@v2
26+
with:
27+
php-version: ${{ matrix.php }}
28+
coverage: xdebug
29+
30+
- name: Validate composer.json
31+
run: composer validate
32+
33+
- name: Cache dependencies
34+
id: composer-cache
35+
uses: actions/cache@v2
36+
with:
37+
path: vendor
38+
key: php-${{ matrix.php }}-${{ matrix.dependencies }}-${{ hashFiles('composer.json') }}
39+
40+
- name: Install dependencies ${{ matrix.dependencies == 'lo' && '(lowest)' || '' }}
41+
run: composer update --no-interaction --no-progress
42+
${{ matrix.dependencies == 'lo' && '--prefer-lowest' || '' }}
43+
44+
- name: Run test suite with coverage
45+
run: composer test -- --coverage-clover=build/logs/clover.xml --coverage-xml=build/coverage/coverage-xml
46+
--log-junit=build/coverage/junit.xml
47+
48+
- name: Upload test coverage
49+
run: |
50+
curl -Os https://uploader.codecov.io/latest/linux/codecov
51+
chmod +x codecov
52+
./codecov -t $CODECOV_TOKEN
53+
env:
54+
COVERALLS_REPO_TOKEN: ${{ secrets.CODECOV_TOKEN }}
55+
56+
- name: Run mutation tests
57+
run: |
58+
ln -sfv ../build test
59+
composer mutation -- --min-msi=99 --threads=$(nproc) --show-mutations --coverage=build/coverage
60+
env:
61+
INFECTION_BADGE_API_KEY: ${{ secrets.INFECTION_BADGE_API_KEY }}

.travis.yml

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

0 commit comments

Comments
 (0)