Skip to content

Commit 6b59098

Browse files
authored
[CI] Moved to Github Actions (#125)
1 parent 32b02a8 commit 6b59098

File tree

3 files changed

+72
-30
lines changed

3 files changed

+72
-30
lines changed

.github/workflows/ci.yaml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- '[0-9]+.[0-9]+'
8+
pull_request: ~
9+
10+
jobs:
11+
cs-fix:
12+
name: Run code style check
13+
runs-on: "ubuntu-20.04"
14+
strategy:
15+
matrix:
16+
php:
17+
- '7.3'
18+
steps:
19+
- uses: actions/checkout@v2
20+
21+
- name: Setup PHP Action
22+
uses: shivammathur/setup-php@v2
23+
with:
24+
php-version: ${{ matrix.php }}
25+
coverage: none
26+
extensions: 'pdo_sqlite, gd'
27+
tools: cs2pr
28+
29+
- uses: "ramsey/composer-install@v1"
30+
with:
31+
dependency-versions: "highest"
32+
33+
- name: Run code style check
34+
run: composer run-script check-cs -- --format=checkstyle | cs2pr
35+
36+
tests:
37+
name: Unit tests
38+
runs-on: "ubuntu-20.04"
39+
timeout-minutes: 15
40+
41+
strategy:
42+
fail-fast: false
43+
matrix:
44+
php:
45+
- '7.1'
46+
- '7.2'
47+
- '7.3'
48+
49+
steps:
50+
- uses: actions/checkout@v2
51+
52+
- name: Setup PHP Action
53+
uses: shivammathur/setup-php@v2
54+
with:
55+
php-version: ${{ matrix.php }}
56+
coverage: none
57+
extensions: pdo_sqlite, gd
58+
tools: cs2pr
59+
60+
- uses: "ramsey/composer-install@v1"
61+
with:
62+
dependency-versions: "highest"
63+
composer-options: "${{ matrix.composer_options }}"
64+
65+
- name: Setup problem matchers for PHPUnit
66+
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
67+
68+
- name: Run unit test suite
69+
run: composer test

.travis.yml

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

composer.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545
}
4646
},
4747
"scripts": {
48-
"fix-cs": "@php ./vendor/bin/php-cs-fixer fix -v --show-progress=estimating"
48+
"fix-cs": "php-cs-fixer fix -v --show-progress=estimating",
49+
"check-cs": "@fix-cs --dry-run",
50+
"test": "phpspec run --format=pretty"
4951
}
5052
}

0 commit comments

Comments
 (0)