Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/lint-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: lint php documentation

on:
push:
pull_request:
types: [opened, synchronize, reopened]
branches:
- master
- QA

jobs:
lint-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: lint php documentation
uses: sudo-bot/action-doctum@v5
with:
config-file: tools/doctum-config.php
method: "parse"
cli-args: "--output-format=github --no-ansi --no-progress -v --ignore-parse-errors"
32 changes: 32 additions & 0 deletions .github/workflows/lint-php.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Lint php files

on:
push:
pull_request:
types: [opened, synchronize, reopened]
branches:
- master
- QA

jobs:
lint-php:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Use php 7.1
uses: shivammathur/setup-php@v2
with:
php-version: 7.1
tools: composer:v2
- name: Validate composer.json and composer.lock
run: composer validate
- name: Cache module
uses: actions/cache@v2
with:
path: ~/.composer/cache/
key: composer-cache
- name: Install dependencies
run: composer install --no-interaction --prefer-dist --no-progress --no-suggest
- name: Lint files
run: ./vendor/bin/phpcs

46 changes: 46 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Run tests

on:
push:
pull_request:
types: [opened, synchronize, reopened]
branches:
- master
- QA

jobs:
test-php:
name: Test on php ${{ matrix.php-version }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
php-version: ["5.3", "5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4"]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v1
- name: Use php ${{ matrix.php-version }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: mbstring
coverage: xdebug
- name: Cache module
uses: actions/cache@v2
with:
path: ~/.composer/cache/
key: composer-cache
- name: Install dependencies
run: composer install --no-interaction --prefer-dist --no-progress --no-suggest
- name: Install motranslator
if: ${{ matrix.php-version == '7.1' }}
run: composer require phpmyadmin/motranslator:^3.0
- name: Run php tests
run: ./vendor/bin/phpunit
- name: Send coverage
uses: codecov/codecov-action@v1
- name: Send coverage to Scrutinizer
uses: sudo-bot/action-scrutinizer@latest
# Upload can fail on forks
continue-on-error: true
with:
cli-args: "--format=php-clover build/logs/clover.xml"
27 changes: 1 addition & 26 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,6 @@ language: php
dist: trusty

php:
- 5.4
- 5.5
- 5.6
- 7.0
- 7.1
- 7.2
- 7.3
- 7.4
- hhvm-3.12
- hhvm-3.24
- nightly
Expand All @@ -19,30 +11,13 @@ matrix:
fast_finish: true
allow_failures:
- php: nightly
include:
- php: 7.2
name: "Build documentation"
env:
- DOCS=yes
- REQUIRE="code-lts/doctum:^5.0"
script: ./vendor/bin/doctum.php --no-interaction update ./tools/doctum-config.php
after_success: skip
- php: 7.1
env: REQUIRE="phpmyadmin/motranslator:^3.0"
- dist: precise
php: 5.3

install:
- if [ -n "$REQUIRE" ] ; then composer require "$REQUIRE" ; fi
- composer install

after_success:
- bash <(curl -s https://codecov.io/bash)
- 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

cache:
directories:
- $HOME/.composer/cache

script:
- ./vendor/bin/phpunit --configuration phpunit.xml.dist
- ./vendor/bin/phpunit
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"source": "https://github.com/phpmyadmin/sql-parser"
},
"require": {
"php": ">=5.3.0",
"php": "^5.3.0 || ^7.0",
"symfony/polyfill-mbstring": "^1.3"
},
"require-dev": {
Expand Down