Skip to content

Commit

Permalink
Introduced a smoke testing phase on Travis to run SQLite tests and CS…
Browse files Browse the repository at this point in the history
… checks first
  • Loading branch information
morozov committed Apr 30, 2018
1 parent e51e73e commit 0081d49
Showing 1 changed file with 48 additions and 16 deletions.
64 changes: 48 additions & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ after_script:
php ocular.phar code-coverage:upload --format=php-clover clover.xml
fi
stages:
- Smoke Testing
- Test
- Coding Standard

jobs:
allow_failures:
- php: nightly
Expand All @@ -64,10 +69,25 @@ jobs:
env: DB=mysqli

include:
- stage: Test
- stage: Smoke Testing
php: 7.1
env: DB=sqlite COVERAGE=yes

- stage: Smoke Testing
if: type = pull_request
php: 7.1
env: DB=none CODING_STANDARDS
install: travis_retry composer install --prefer-dist
script:
- |
if [ $TRAVIS_BRANCH != "master" ]; then
git remote set-branches --add origin $TRAVIS_BRANCH;
git fetch origin $TRAVIS_BRANCH;
fi
- git merge-base origin/$TRAVIS_BRANCH $TRAVIS_PULL_REQUEST_SHA || git fetch origin +refs/pull/$TRAVIS_PULL_REQUEST/merge --unshallow
- wget https://github.com/diff-sniffer/git/releases/download/0.1.0/git-phpcs.phar
- php git-phpcs.phar origin/$TRAVIS_BRANCH...$TRAVIS_PULL_REQUEST_SHA

- stage: Test
php: 7.1
env: DB=mysql COVERAGE=yes
Expand All @@ -82,12 +102,14 @@ jobs:
sudo: required
before_script:
- bash ./tests/travis/install-mysql-5.7.sh

- stage: Test
php: 7.2
env: DB=mysql MYSQL_VERSION=5.7
sudo: required
before_script:
- bash ./tests/travis/install-mysql-5.7.sh

- stage: Test
php: nightly
env: DB=mysql MYSQL_VERSION=5.7
Expand All @@ -101,12 +123,14 @@ jobs:
sudo: required
before_script:
- bash ./tests/travis/install-mysql-5.7.sh

- stage: Test
php: 7.2
env: DB=mysqli MYSQL_VERSION=5.7
sudo: required
before_script:
- bash ./tests/travis/install-mysql-5.7.sh

- stage: Test
php: nightly
env: DB=mysqli MYSQL_VERSION=5.7
Expand All @@ -119,11 +143,13 @@ jobs:
env: DB=mariadb MARIADB_VERSION=10.0 COVERAGE=yes
addons:
mariadb: 10.0

- stage: Test
php: 7.2
env: DB=mariadb MARIADB_VERSION=10.0
addons:
mariadb: 10.0

- stage: Test
php: nightly
env: DB=mariadb MARIADB_VERSION=10.0
Expand All @@ -135,11 +161,13 @@ jobs:
env: DB=mariadb MARIADB_VERSION=10.1 COVERAGE=yes
addons:
mariadb: 10.1

- stage: Test
php: 7.2
env: DB=mariadb MARIADB_VERSION=10.1
addons:
mariadb: 10.1

- stage: Test
php: nightly
env: DB=mariadb MARIADB_VERSION=10.1
Expand All @@ -151,11 +179,13 @@ jobs:
env: DB=mariadb MARIADB_VERSION=10.2 COVERAGE=yes
addons:
mariadb: 10.2

- stage: Test
php: 7.2
env: DB=mariadb MARIADB_VERSION=10.2
addons:
mariadb: 10.2

- stage: Test
php: nightly
env: DB=mariadb MARIADB_VERSION=10.2
Expand All @@ -167,11 +197,13 @@ jobs:
env: DB=mariadb.mysqli MARIADB_VERSION=10.2 COVERAGE=yes
addons:
mariadb: 10.2

- stage: Test
php: 7.2
env: DB=mariadb.mysqli MARIADB_VERSION=10.2
addons:
mariadb: 10.2

- stage: Test
php: nightly
env: DB=mariadb.mysqli MARIADB_VERSION=10.2
Expand All @@ -185,13 +217,15 @@ jobs:
- postgresql
addons:
postgresql: "9.2"

- stage: Test
php: 7.2
env: DB=pgsql POSTGRESQL_VERSION=9.2
services:
- postgresql
addons:
postgresql: "9.2"

- stage: Test
php: nightly
env: DB=pgsql POSTGRESQL_VERSION=9.2
Expand All @@ -207,13 +241,15 @@ jobs:
- postgresql
addons:
postgresql: "9.3"

- stage: Test
php: 7.2
env: DB=pgsql POSTGRESQL_VERSION=9.3
services:
- postgresql
addons:
postgresql: "9.3"

- stage: Test
php: nightly
env: DB=pgsql POSTGRESQL_VERSION=9.3
Expand All @@ -229,13 +265,15 @@ jobs:
- postgresql
addons:
postgresql: "9.4"

- stage: Test
php: 7.2
env: DB=pgsql POSTGRESQL_VERSION=9.4
services:
- postgresql
addons:
postgresql: "9.4"

- stage: Test
php: nightly
env: DB=pgsql POSTGRESQL_VERSION=9.4
Expand All @@ -251,13 +289,15 @@ jobs:
- postgresql
addons:
postgresql: "9.5"

- stage: Test
php: 7.2
env: DB=pgsql POSTGRESQL_VERSION=9.5
services:
- postgresql
addons:
postgresql: "9.5"

- stage: Test
php: nightly
env: DB=pgsql POSTGRESQL_VERSION=9.5
Expand All @@ -273,13 +313,15 @@ jobs:
- postgresql
addons:
postgresql: "9.6"

- stage: Test
php: 7.2
env: DB=pgsql POSTGRESQL_VERSION=9.6
services:
- postgresql
addons:
postgresql: "9.6"

- stage: Test
php: nightly
env: DB=pgsql POSTGRESQL_VERSION=9.6
Expand All @@ -298,6 +340,7 @@ jobs:
postgresql: "9.6"
before_script:
- bash ./tests/travis/install-postgres-10.sh

- stage: Test
php: 7.2
env: DB=pgsql POSTGRESQL_VERSION=10.0
Expand All @@ -308,6 +351,7 @@ jobs:
postgresql: "9.6"
before_script:
- bash ./tests/travis/install-postgres-10.sh

- stage: Test
php: nightly
env: DB=pgsql POSTGRESQL_VERSION=10.0
Expand All @@ -327,6 +371,7 @@ jobs:
before_script:
- bash ./tests/travis/install-mssql-$DB.sh
- bash ./tests/travis/install-mssql.sh

- stage: Test
php: 7.2
env: DB=sqlsrv
Expand All @@ -346,6 +391,7 @@ jobs:
before_script:
- bash ./tests/travis/install-mssql-$DB.sh
- bash ./tests/travis/install-mssql.sh

- stage: Test
php: 7.2
env: DB=pdo_sqlsrv
Expand All @@ -370,21 +416,7 @@ jobs:
- composer config minimum-stability dev
- travis_retry composer update --prefer-dist

- stage: Pull request coding standard
if: type = pull_request
php: 7.1
install: travis_retry composer install --prefer-dist
script:
- |
if [ $TRAVIS_BRANCH != "master" ]; then
git remote set-branches --add origin $TRAVIS_BRANCH;
git fetch origin $TRAVIS_BRANCH;
fi
- git merge-base origin/$TRAVIS_BRANCH $TRAVIS_PULL_REQUEST_SHA || git fetch origin +refs/pull/$TRAVIS_PULL_REQUEST/merge --unshallow
- wget https://github.com/diff-sniffer/git/releases/download/0.1.0/git-phpcs.phar
- php git-phpcs.phar origin/$TRAVIS_BRANCH...$TRAVIS_PULL_REQUEST_SHA

- stage: Coding standard
- stage: Coding Standard
if: NOT type = pull_request
php: 7.1
install: travis_retry composer install --prefer-dist
Expand Down

0 comments on commit 0081d49

Please sign in to comment.