Skip to content

Commit 800c488

Browse files
authored
Use Github Actions instead of Travis (#127)
* Use Github Actions instead of travis * remove coveralls integration
1 parent 02dfed0 commit 800c488

File tree

7 files changed

+61
-46
lines changed

7 files changed

+61
-46
lines changed

.coveralls.yml

-3
This file was deleted.

.editorconfig

+4
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,7 @@ trim_trailing_whitespace = true
77
insert_final_newline = true
88
indent_style = tab
99
indent_size = 4
10+
11+
[*.{yml,yaml}]
12+
indent_style = space
13+
indent_size = 2

.gitattributes

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
tests export-ignore
2-
.coveralls.yml export-ignore
32
.editorconfig export-ignore
43
.gitattributes export-ignore
54
.gitignore export-ignore

.github/workflows/tests.yml

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: tests
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
tests:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
php-version:
11+
- "7.1"
12+
- "7.2"
13+
- "7.3"
14+
- "7.4"
15+
16+
steps:
17+
- name: "Checkout"
18+
uses: "actions/[email protected]"
19+
20+
- name: "Install PHP"
21+
uses: shivammathur/setup-php@v2
22+
with:
23+
coverage: "none"
24+
php-version: "${{ matrix.php-version }}"
25+
26+
- name: "Validate Composer"
27+
run: "composer validate"
28+
29+
- name: "Cache dependencies"
30+
uses: "actions/[email protected]"
31+
with:
32+
path: "~/.composer/cache"
33+
key: "php-${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}"
34+
restore-keys: "php-${{ matrix.php-version }}-composer-"
35+
36+
- name: "Install dependencies"
37+
run: "composer update --no-interaction --no-progress --no-suggest --prefer-dist"
38+
39+
- name: "Check Composer"
40+
run: "composer run-script check:composer"
41+
if: ${{ matrix.php-version == '7.4' }}
42+
43+
- name: "Check lint"
44+
run: "composer run-script check:lint"
45+
46+
- name: "Check CodeStyle"
47+
run: "composer run-script check:cs"
48+
if: ${{ matrix.php-version == '7.4' }}
49+
50+
- name: "Check types"
51+
run: "composer run-script check:types"
52+
if: ${{ matrix.php-version == '7.4' }}
53+
54+
- name: "Check tests"
55+
run: "composer run-script check:tests"

.travis.yml

-27
This file was deleted.

composer.json

+2-4
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
},
2424
"require-dev": {
2525
"nette/utils": "^3.0",
26-
"php-coveralls/php-coveralls": "^2.1",
2726
"php-parallel-lint/php-console-highlighter": "^0.4.0",
2827
"php-parallel-lint/php-parallel-lint": "^1.2.0",
2928
"phpstan/phpstan-nette": "^0.12.0",
@@ -55,13 +54,12 @@
5554
"@check:tests"
5655
],
5756
"check:composer": "composer validate",
58-
"check:tests": "phpunit --coverage-text",
57+
"check:tests": "phpunit",
5958
"check:cs": "phpcs --extensions=php --encoding=utf-8 --tab-width=4 --colors --ignore=tests/*/data -sp src tests/src",
6059
"check:lint": "parallel-lint src tests/src",
6160
"check:types": "phpstan analyse --memory-limit=1G -l max src tests",
6261
"fix": "@fix:cs",
63-
"fix:cs": "phpcbf --extensions=php --encoding=utf-8 --tab-width=4 --colors --ignore=tests/*/data -sp src tests/src",
64-
"coveralls": "php-coveralls -v"
62+
"fix:cs": "phpcbf --extensions=php --encoding=utf-8 --tab-width=4 --colors --ignore=tests/*/data -sp src tests/src"
6563
},
6664
"config": {
6765
"sort-packages": true

phpunit.xml.dist

-11
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,6 @@
1111
failOnRisky="true"
1212
failOnWarning="true"
1313
>
14-
15-
<logging>
16-
<log
17-
type="coverage-text"
18-
target="php://stdout"
19-
showUncoveredFiles="true"
20-
showOnlySummary="true"
21-
/>
22-
<log type="coverage-clover" target="tests/tmp/clover.xml"/>
23-
</logging>
24-
2514
<testsuites>
2615
<testsuite name="Exception rules for PHPStan">
2716
<directory>./tests</directory>

0 commit comments

Comments
 (0)