Skip to content

Commit 24cb6bc

Browse files
committed
Replace Travis with GitHub Actions
1 parent d2dc886 commit 24cb6bc

File tree

2 files changed

+77
-44
lines changed

2 files changed

+77
-44
lines changed

.github/workflows/tests.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: tests
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
latest:
9+
name: PHP ${{ matrix.php }} Latest
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
php: ['7.2', '7.3', '7.4', '8.0', '8.1']
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v2
18+
19+
- name: Setup PHP
20+
uses: shivammathur/setup-php@v2
21+
with:
22+
php-version: ${{ matrix.php }}
23+
tools: composer:v2
24+
coverage: none
25+
26+
- name: Install PHP dependencies
27+
run: composer update --prefer-dist --no-interaction --no-progress
28+
29+
- name: Execute tests
30+
run: composer test
31+
32+
lowest:
33+
name: PHP ${{ matrix.php }} Lowest
34+
runs-on: ubuntu-latest
35+
36+
steps:
37+
- name: Checkout code
38+
uses: actions/checkout@v2
39+
40+
- name: Setup PHP
41+
uses: shivammathur/setup-php@v2
42+
with:
43+
php-version: 7.2
44+
tools: composer:v2
45+
coverage: none
46+
47+
- name: Install dependencies
48+
run: composer update --prefer-dist --prefer-stable --prefer-lowest --no-interaction --no-progress
49+
50+
- name: Execute tests
51+
run: composer test
52+
53+
coverage:
54+
name: Code Coverage
55+
runs-on: ubuntu-latest
56+
57+
steps:
58+
- name: Checkout code
59+
uses: actions/checkout@v2
60+
61+
- name: Setup PHP
62+
uses: shivammathur/setup-php@v2
63+
with:
64+
php-version: 8.1
65+
tools: composer:v2
66+
coverage: xdebug
67+
68+
- name: Install dependencies
69+
run: composer update --prefer-dist --no-interaction --no-progress
70+
71+
- name: Execute tests
72+
run: composer test-ci
73+
74+
- name: Upload coverage
75+
run: |
76+
wget https://scrutinizer-ci.com/ocular.phar
77+
php ocular.phar code-coverage:upload --format=php-clover build/coverage.xml

.travis.yml

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

0 commit comments

Comments
 (0)