Skip to content

Commit c9ed634

Browse files
authored
Switch from travis to Github actions (#304)
* Switch from travis to Github actions * Update PHPUnit with yoast polyfill for 7.0 to 8.0 support. * Housekeeping: CS * Comment out lint for now, lots of failures, why?
1 parent c61e82d commit c9ed634

11 files changed

+335
-564
lines changed

.github/workflows/ci.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
on: push
2+
name: CI
3+
jobs:
4+
tests:
5+
name: Tests
6+
runs-on: ubuntu-latest
7+
strategy:
8+
matrix:
9+
php-versions: ['7.0', '7.1', '7.2', '7.3', '7.4', '8.0']
10+
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v1
14+
15+
- name: Setup PHP
16+
uses: shivammathur/setup-php@v2
17+
with:
18+
php-version: ${{ matrix.php-versions }}
19+
tools: "cs2pr"
20+
21+
- name: "Cache dependencies installed with composer"
22+
uses: "actions/cache@v1"
23+
with:
24+
path: "~/.composer/cache"
25+
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
26+
restore-keys: "php-${{ matrix.php-version }}-composer-locked-"
27+
28+
- name: "Composer"
29+
run: "composer update --prefer-stable"
30+
31+
- name: "PHPUnit"
32+
run: "php vendor/bin/phpunit"
33+
34+
# lint:
35+
# name: Lint
36+
# runs-on: ubuntu-latest
37+
38+
# steps:
39+
# - name: Checkout
40+
# uses: actions/checkout@v1
41+
42+
# - name: Setup PHP
43+
# uses: shivammathur/setup-php@v2
44+
# with:
45+
# php-version: 7.4
46+
47+
# - name: "Cache dependencies installed with composer"
48+
# uses: "actions/cache@v1"
49+
# with:
50+
# path: "~/.composer/cache"
51+
# key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
52+
# restore-keys: "php-${{ matrix.php-version }}-composer-locked-"
53+
54+
# - name: "Composer"
55+
# run: "composer update --prefer-stable"
56+
57+
# - name: "assert:cs-lint"
58+
# run: "composer assert:cs-lint"
59+
60+
# - name: "assert:sa-code"
61+
# run: "composer assert:sa-code"
62+
63+
# - name: "assert:sa-tests"
64+
# run: "composer assert:sa-tests"

.travis.yml

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

.travis/xdebug.sh

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

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@
3333
"require-dev": {
3434
"friendsofphp/php-cs-fixer": "*",
3535
"phpstan/phpstan": "*",
36-
"phpunit/phpunit": ">=6.0.0 <8"
36+
"phpunit/phpunit": ">=6.0.0",
37+
"yoast/phpunit-polyfills": "^0.1.0"
3738
},
3839
"autoload": {
3940
"psr-4": {

0 commit comments

Comments
 (0)