Skip to content

Commit ca8d5f3

Browse files
committed
Merge #324 - Move to GitHub actions
Except: hhvm-3.12 and hhvm-3.24 and nightly
2 parents 278bb29 + e40bab2 commit ca8d5f3

File tree

5 files changed

+101
-27
lines changed

5 files changed

+101
-27
lines changed

.github/workflows/lint-docs.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: lint php documentation
2+
3+
on:
4+
push:
5+
pull_request:
6+
types: [opened, synchronize, reopened]
7+
branches:
8+
- master
9+
- QA
10+
11+
jobs:
12+
lint-docs:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: lint php documentation
17+
uses: sudo-bot/action-doctum@v5
18+
with:
19+
config-file: tools/doctum-config.php
20+
method: "parse"
21+
cli-args: "--output-format=github --no-ansi --no-progress -v --ignore-parse-errors"

.github/workflows/lint-php.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Lint php files
2+
3+
on:
4+
push:
5+
pull_request:
6+
types: [opened, synchronize, reopened]
7+
branches:
8+
- master
9+
- QA
10+
11+
jobs:
12+
lint-php:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v1
16+
- name: Use php 7.1
17+
uses: shivammathur/setup-php@v2
18+
with:
19+
php-version: 7.1
20+
tools: composer:v2
21+
- name: Validate composer.json and composer.lock
22+
run: composer validate
23+
- name: Cache module
24+
uses: actions/cache@v2
25+
with:
26+
path: ~/.composer/cache/
27+
key: composer-cache
28+
- name: Install dependencies
29+
run: composer install --no-interaction --prefer-dist --no-progress --no-suggest
30+
- name: Lint files
31+
run: ./vendor/bin/phpcs
32+

.github/workflows/tests.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Run tests
2+
3+
on:
4+
push:
5+
pull_request:
6+
types: [opened, synchronize, reopened]
7+
branches:
8+
- master
9+
- QA
10+
11+
jobs:
12+
test-php:
13+
name: Test on php ${{ matrix.php-version }} and ${{ matrix.os }}
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
matrix:
17+
php-version: ["5.3", "5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4"]
18+
os: [ubuntu-latest]
19+
steps:
20+
- uses: actions/checkout@v1
21+
- name: Use php ${{ matrix.php-version }}
22+
uses: shivammathur/setup-php@v2
23+
with:
24+
php-version: ${{ matrix.php-version }}
25+
extensions: mbstring
26+
coverage: xdebug
27+
- name: Cache module
28+
uses: actions/cache@v2
29+
with:
30+
path: ~/.composer/cache/
31+
key: composer-cache
32+
- name: Install dependencies
33+
run: composer install --no-interaction --prefer-dist --no-progress --no-suggest
34+
- name: Install motranslator
35+
if: ${{ matrix.php-version == '7.1' }}
36+
run: composer require phpmyadmin/motranslator:^3.0
37+
- name: Run php tests
38+
run: ./vendor/bin/phpunit
39+
- name: Send coverage
40+
uses: codecov/codecov-action@v1
41+
- name: Send coverage to Scrutinizer
42+
uses: sudo-bot/action-scrutinizer@latest
43+
# Upload can fail on forks
44+
continue-on-error: true
45+
with:
46+
cli-args: "--format=php-clover build/logs/clover.xml"

.travis.yml

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,6 @@ language: php
33
dist: trusty
44

55
php:
6-
- 5.4
7-
- 5.5
8-
- 5.6
9-
- 7.0
10-
- 7.1
11-
- 7.2
12-
- 7.3
13-
- 7.4
146
- hhvm-3.12
157
- hhvm-3.24
168
- nightly
@@ -19,30 +11,13 @@ matrix:
1911
fast_finish: true
2012
allow_failures:
2113
- php: nightly
22-
include:
23-
- php: 7.2
24-
name: "Build documentation"
25-
env:
26-
- DOCS=yes
27-
- REQUIRE="code-lts/doctum:^5.0"
28-
script: ./vendor/bin/doctum.php --no-interaction update ./tools/doctum-config.php
29-
after_success: skip
30-
- php: 7.1
31-
env: REQUIRE="phpmyadmin/motranslator:^3.0"
32-
- dist: precise
33-
php: 5.3
3414

3515
install:
36-
- if [ -n "$REQUIRE" ] ; then composer require "$REQUIRE" ; fi
3716
- composer install
3817

39-
after_success:
40-
- bash <(curl -s https://codecov.io/bash)
41-
- if [ -f build/logs/clover.xml ] ; then curl -LsO https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml; fi
42-
4318
cache:
4419
directories:
4520
- $HOME/.composer/cache
4621

4722
script:
48-
- ./vendor/bin/phpunit --configuration phpunit.xml.dist
23+
- ./vendor/bin/phpunit

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"source": "https://github.com/phpmyadmin/sql-parser"
1717
},
1818
"require": {
19-
"php": ">=5.3.0",
19+
"php": "^5.3.0 || ^7.0",
2020
"symfony/polyfill-mbstring": "^1.3"
2121
},
2222
"require-dev": {

0 commit comments

Comments
 (0)