Skip to content

Commit bab0021

Browse files
committed
Merge pull request #1042 from propelorm/revert-1000-tr
Revert "Migrate from circle to travis"
2 parents 0299c23 + 4c9fdb6 commit bab0021

22 files changed

+147
-398
lines changed

.travis.yml

Lines changed: 21 additions & 150 deletions
Original file line numberDiff line numberDiff line change
@@ -4,164 +4,35 @@ php:
44
- 5.4
55
- 5.5
66
- 5.6
7-
- 7.0
8-
- nightly
7+
- hhvm
98

109
env:
11-
- DB=agnostic #only database agnostic tests
12-
- DB=mysql
10+
- DB=agnostic #only database agnostic tests
11+
- DB=mysql DB_USER=root #only database tests against mysql
12+
- DB=pgsql DB_USER=postgres DB_NAME=postgres #only database tests against postgresql
1313
- DB=sqlite
1414

15-
before_install:
16-
- travis_retry composer self-update
17-
18-
install:
19-
- travis_retry composer install --prefer-dist --no-interaction
20-
2115
before_script:
22-
- if [[ $DB != 'agnostic' && $DB != 'sqlite' ]]; then ./tests/bin/setup.$DB.sh; fi
16+
# Composer
17+
- wget http://getcomposer.org/composer.phar
18+
- php composer.phar install --prefer-dist
19+
20+
- if [ "$DB" != 'agnostic' ]; then ./tests/bin/setup.$DB.sh; fi # setup only for integration tests
2321

2422
script:
25-
- ./vendor/bin/phpunit -v -c tests/$DB.phpunit.xml;
23+
- ./tests/bin/phpunit.$DB.sh;
2624

2725

2826
matrix:
29-
include:
30-
- php: 5.4
31-
env: DB=mysql MARIADB=5.5
32-
addons:
33-
mariadb: 5.5
34-
- php: 5.5
35-
env: DB=mysql MARIADB=5.5
36-
addons:
37-
mariadb: 5.5
38-
- php: 5.6
39-
env: DB=mysql MARIADB=5.5
40-
addons:
41-
mariadb: 5.5
42-
- php: 7.0
43-
env: DB=mysql MARIADB=5.5
44-
addons:
45-
mariadb: 5.5
46-
47-
- php: 5.4
48-
env: DB=mysql MARIADB=10.0
49-
addons:
50-
mariadb: 10.0
51-
- php: 5.5
52-
env: DB=mysql MARIADB=10.0
53-
addons:
54-
mariadb: 10.0
55-
- php: 5.6
56-
env: DB=mysql MARIADB=10.0
57-
addons:
58-
mariadb: 10.0
59-
- php: 7.0
60-
env: DB=mysql MARIADB=10.0
61-
addons:
62-
mariadb: 10.0
63-
64-
- php: 5.4
65-
env: DB=mysql MARIADB=10.1
66-
addons:
67-
mariadb: 10.1
68-
- php: 5.5
69-
env: DB=mysql MARIADB=10.1
70-
addons:
71-
mariadb: 10.1
72-
- php: 5.6
73-
env: DB=mysql MARIADB=10.1
74-
addons:
75-
mariadb: 10.1
76-
- php: 7.0
77-
env: DB=mysql MARIADB=10.1
78-
addons:
79-
mariadb: 10.1
80-
81-
- php: 5.4
82-
env: DB=pgsql POSTGRES=9.1
83-
addons:
84-
postgresql: 9.1
85-
- php: 5.5
86-
env: DB=pgsql POSTGRES=9.1
87-
addons:
88-
postgresql: 9.1
89-
- php: 5.6
90-
env: DB=pgsql POSTGRES=9.1
91-
addons:
92-
postgresql: 9.1
93-
- php: 7.0
94-
env: DB=pgsql POSTGRES=9.1
95-
addons:
96-
postgresql: 9.1
97-
98-
- php: 5.4
99-
env: DB=pgsql POSTGRES=9.2
100-
addons:
101-
postgresql: 9.2
102-
- php: 5.5
103-
env: DB=pgsql POSTGRES=9.2
104-
addons:
105-
postgresql: 9.2
106-
- php: 5.6
107-
env: DB=pgsql POSTGRES=9.2
108-
addons:
109-
postgresql: 9.2
110-
- php: 7.0
111-
env: DB=pgsql POSTGRES=9.2
112-
addons:
113-
postgresql: 9.2
114-
115-
- php: 5.4
116-
env: DB=pgsql POSTGRES=9.3
117-
addons:
118-
postgresql: 9.3
119-
- php: 5.5
120-
env: DB=pgsql POSTGRES=9.3
121-
addons:
122-
postgresql: 9.3
123-
- php: 5.6
124-
env: DB=pgsql POSTGRES=9.3
125-
addons:
126-
postgresql: 9.3
127-
- php: 7.0
128-
env: DB=pgsql POSTGRES=9.3
129-
addons:
130-
postgresql: 9.3
131-
132-
- php: 5.4
133-
env: DB=pgsql POSTGRES=9.4
134-
addons:
135-
postgresql: 9.4
136-
- php: 5.5
137-
env: DB=pgsql POSTGRES=9.4
138-
addons:
139-
postgresql: 9.4
140-
- php: 5.6
141-
env: DB=pgsql POSTGRES=9.4
142-
addons:
143-
postgresql: 9.4
144-
- php: 7.0
145-
env: DB=pgsql POSTGRES=9.4
146-
addons:
147-
postgresql: 9.4
148-
149-
allow_failures:
150-
- php: nightly
151-
15227
fast_finish: true
153-
154-
# cache vendors
155-
cache:
156-
directories:
157-
- vendor
158-
- $HOME/.composer/cache
159-
160-
# This triggers builds to run on the new TravisCI infrastructure.
161-
# See: http://docs.travis-ci.com/user/workers/container-based-infrastructure/
162-
sudo: false
163-
164-
notifications:
165-
webhooks:
166-
- http://propel.jarves.io/build.php
167-
- https://webhooks.gitter.im/e/206efe76e183f9ade489
28+
allow_failures:
29+
- php: hhvm
30+
- php: 5.6
31+
exclude:
32+
- php: hhvm
33+
env: DB=pgsql DB_USER=postgres DB_NAME=postgres # driver currently unsupported by HHVM
34+
- php: hhvm
35+
env: DB=sqlite # some issues at the moment
36+
37+
#after_script:
38+
# - php vendor/bin/coveralls -v

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Propel2 is an open-source Object-Relational Mapping (ORM) for PHP 5.4.
44

5-
[![Build Status](https://travis-ci.org/propelorm/Propel2.svg?branch=master)](https://travis-ci.org/propelorm/Propel2)
5+
[![Build Status](https://circleci.com/gh/propelorm/Propel2/tree/master.png?style=shield)](https://circleci.com/gh/propelorm/Propel2/tree/master)
66
[![Code Climate](https://codeclimate.com/github/propelorm/Propel2/badges/gpa.svg)](https://codeclimate.com/github/propelorm/Propel2)
77
<a href="https://codeclimate.com/github/propelorm/Propel2"><img src="https://codeclimate.com/github/propelorm/Propel2/badges/coverage.svg" /></a>
88
[![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/propelorm/Propel)

circle.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ dependencies:
1010
- echo "memory_limit=520M" > ~/.phpenv/versions/$(phpenv global)/etc/conf.d/memlimit.ini
1111
- if [ "$CIRCLE_NODE_INDEX" = "1" ]; then ./tests/bin/setup.mysql.sh; fi
1212
- if [ "$CIRCLE_NODE_INDEX" = "2" ]; then ./tests/bin/setup.pgsql.sh; fi
13+
- if [ "$CIRCLE_NODE_INDEX" = "3" ]; then ./tests/bin/setup.sqlite.sh; fi
1314

1415
notify:
1516
webhooks:

phpunit.xml.dist

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
convertWarningsToExceptions="true"
88
processIsolation="false"
99
stopOnFailure="false"
10+
syntaxCheck="false"
1011
bootstrap="tests/bootstrap.php"
1112
>
1213

@@ -16,19 +17,6 @@
1617
</testsuite>
1718
</testsuites>
1819

19-
<groups>
20-
<exclude>
21-
<group>pgsql</group>
22-
<group>mysql</group>
23-
</exclude>
24-
</groups>
25-
26-
<php>
27-
<env name="DB" value="mysql"/> <!-- mysql, sqlite, pgsql -->
28-
<env name="DB_USER" value=""/>
29-
<env name="DB_PW" value=""/>
30-
</php>
31-
3220
<logging>
3321
<!--<log type="coverage-php" target="tests/clover.cov"/>-->
3422
<!--<log type="coverage-html" target="tests/coverage-report" charset="UTF-8"
@@ -38,6 +26,26 @@
3826
<filter>
3927
<whitelist>
4028
<directory>src/Propel/</directory>
29+
<exclude>
30+
<directory>src/Propel/Generator/Builder/SQL/Mssql</directory>
31+
<directory>src/Propel/Generator/Builder/SQL/Oracle</directory>
32+
<directory>src/Propel/Generator/Builder/SQL/Sqlsrv</directory>
33+
34+
<file>src/Propel/Generator/Platform/MssqlPlatform.php</file>
35+
<file>src/Propel/Generator/Platform/OraclePlatform.php</file>
36+
<file>src/Propel/Generator/Platform/SqlsrvPlatform.php</file>
37+
38+
<file>src/Propel/Generator/Reverse/MssqlSchemaParser.php</file>
39+
<file>src/Propel/Generator/Reverse/OracleSchemaParser.php</file>
40+
<file>src/Propel/Generator/Reverse/SqlsrvSchemaParser.php</file>
41+
42+
<directory>src/Propel/Runtime/Adapter/MSSQL</directory>
43+
<file>src/Propel/Runtime/Adapter/Pdo/MssqlAdapter.php</file>
44+
<file>src/Propel/Runtime/Adapter/Pdo/OracleAdapter.php</file>
45+
<file>src/Propel/Runtime/Adapter/Pdo/SqlsrvAdapter.php</file>
46+
47+
<file>src/Propel/Runtime/Adapter/Pdo/SqlsrvAdapter.php</file>
48+
</exclude>
4149
</whitelist>
4250
</filter>
4351
</phpunit>

src/Propel/Generator/Util/QuickBuilder.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -487,12 +487,6 @@ public function fixNamespaceDeclarations($source)
487487
protected function forceNamespace($code)
488488
{
489489
if (0 === preg_match('/\nnamespace/', $code)) {
490-
491-
$use = array_filter(explode(PHP_EOL, $code), function($string) {
492-
return substr($string, 0, 5) === 'use \\';
493-
});
494-
495-
$code = str_replace($use, '', $code);
496490
return "\nnamespace\n{\n" . $code . "\n}\n";
497491
}
498492

tests/Propel/Tests/BookstoreLoggingTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,6 @@ public function testQueryFilter()
131131
$this->assertEquals($author->getId(), $foundAuthor->getId());
132132
}
133133

134-
/**
135-
*
136-
* @group mysql
137-
* @group pgsql
138-
*/
139134
public function testQueryJoins()
140135
{
141136
if ($this->runningOnSQLite()) {

tests/Propel/Tests/Generator/Behavior/Versionable/VersionableBehaviorObjectBuilderModifierTest.php

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@
2121
class VersionableBehaviorObjectBuilderModifierTest extends TestCase
2222
{
2323

24-
public static function setUpBeforeClass()
24+
public function setUp()
2525
{
26-
$schema = <<<EOF
26+
if (!class_exists('VersionableBehaviorTest1')) {
27+
$schema = <<<EOF
2728
<database name="versionable_behavior_test_1">
2829
<table name="versionable_behavior_test_1">
2930
<column name="id" primaryKey="true" type="INTEGER" autoIncrement="true" />
@@ -64,9 +65,10 @@ public static function setUpBeforeClass()
6465
</table>
6566
</database>
6667
EOF;
67-
QuickBuilder::buildSchema($schema);
68-
69-
$schema2 = <<<EOF
68+
QuickBuilder::buildSchema($schema);
69+
}
70+
if (!class_exists('VersionableBehaviorTest6')) {
71+
$schema2 = <<<EOF
7072
<database name="versionable_behavior_test_2" defaultPhpNamingMethod="nochange">
7173
<table name="VersionableBehaviorTest6">
7274
<column name="Id" primaryKey="true" type="INTEGER" autoIncrement="true" />
@@ -96,9 +98,11 @@ public static function setUpBeforeClass()
9698
</table>
9799
</database>
98100
EOF;
99-
QuickBuilder::buildSchema($schema2);
101+
QuickBuilder::buildSchema($schema2);
102+
}
100103

101-
$schema3 = <<<EOF
104+
if (!class_exists('VersionableBehaviorTest8')) {
105+
$schema2 = <<<EOF
102106
<database name="versionable_behavior_test_3" defaultPhpNamingMethod="nochange">
103107
<table name="VersionableBehaviorTest8">
104108
<column name="Id" primaryKey="true" type="INTEGER" autoIncrement="true" />
@@ -113,10 +117,12 @@ public static function setUpBeforeClass()
113117
</table>
114118
</database>
115119
EOF;
116-
QuickBuilder::buildSchema($schema3);
120+
QuickBuilder::buildSchema($schema2);
121+
}
117122

118123

119-
$schema4 = <<<EOF
124+
if (!class_exists('VersionableBehaviorTest10')) {
125+
$schema4 = <<<EOF
120126
<database name="versionable_behavior_test_4">
121127
<table name="VersionableBehaviorTest10">
122128
<column name="id" primaryKey="true" type="INTEGER" autoIncrement="true" />
@@ -147,7 +153,8 @@ public static function setUpBeforeClass()
147153
</table>
148154
</database>
149155
EOF;
150-
QuickBuilder::buildSchema($schema4);
156+
QuickBuilder::buildSchema($schema4);
157+
}
151158
}
152159

153160
public function testGetVersionExists()

tests/Propel/Tests/Issues/Issue646Test.php

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,20 @@ protected function setUp()
2626
parent::setUp();
2727
if (!class_exists('\PkDate')) {
2828
$schema = '
29-
<database name="test" defaultIdMethod="native" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
30-
<table name="pk_date">
31-
<column name="created_at" type="DATE" primaryKey="true" />
32-
<column name="name" type="VARCHAR"/>
33-
</table>
34-
<table name="pk_time">
35-
<column name="created_at" type="TIME" primaryKey="true" />
36-
<column name="name" type="VARCHAR"/>
37-
</table>
38-
<table name="pk_timestamp">
39-
<column name="created_at" type="TIMESTAMP" primaryKey="true" />
40-
<column name="name" type="VARCHAR"/>
41-
</table>
42-
</database>';
29+
<database name="test" defaultIdMethod="native"
30+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
31+
<table name="pk_date">
32+
<column name="created_at" type="DATE" primaryKey="true" />
33+
<column name="name" type="VARCHAR"/>
34+
</table>
35+
<table name="pk_time">
36+
<column name="created_at" type="TIME" primaryKey="true" />
37+
<column name="name" type="VARCHAR"/>
38+
</table>
39+
<table name="pk_timestamp">
40+
<column name="created_at" type="TIMESTAMP" primaryKey="true" />
41+
<column name="name" type="VARCHAR"/>
42+
</table>';
4343
QuickBuilder::buildSchema($schema);
4444
}
4545

tests/Propel/Tests/TestCaseFixtures.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ protected function getFixturesConnectionDsn()
222222
if (!$db || 'agnostic' === $db) {
223223
$db = 'mysql';
224224
}
225-
225+
226226
$dsn = $db . ':host=' . (getenv('DB_HOSTNAME') ?: '127.0.0.1' ) . ';dbname=';
227227
$dsn .= getenv('DB_NAME') ?: 'test';
228228

0 commit comments

Comments
 (0)