Browse Source

Another attempt to get travis ci working

Timothy J. Warren 3 years ago
parent
commit
412aa2e820

+ 1
- 0
.travis.yml View File

@@ -16,6 +16,7 @@ before_script:
16 16
   - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'DROP DATABASE IF EXISTS todo_test;' -U postgres; fi"
17 17
   - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'create database todo_test;' -U postgres; fi"
18 18
   - sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'create database IF NOT EXISTS todo_test;'; fi";
19
+  - export ENVRIONMENT=testing-${DB}
19 20
 
20 21
 script:
21 22
   - vendor/bin/phinx migrate -e testing -c tests/phinx/$DB.yml

+ 62
- 0
application/config/testing-mysql/database.php View File

@@ -0,0 +1,62 @@
1
+<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
2
+/*
3
+| -------------------------------------------------------------------
4
+| DATABASE CONNECTIVITY SETTINGS
5
+| -------------------------------------------------------------------
6
+| This file will contain the settings needed to access your database.
7
+|
8
+| For complete instructions please consult the "Database Connection"
9
+| page of the User Guide.
10
+|
11
+| -------------------------------------------------------------------
12
+| EXPLANATION OF VARIABLES
13
+| -------------------------------------------------------------------
14
+|
15
+|	['hostname'] The hostname of your database server.
16
+|	['username'] The username used to connect to the database
17
+|	['password'] The password used to connect to the database
18
+|	['database'] The name of the database you want to connect to
19
+|	['dbdriver'] The database type. ie: mysql.  Currently supported:
20
+				 mysql, mysqli, postgre, odbc, mssql, sqlite, oci8
21
+|	['dbprefix'] You can add an optional prefix, which will be added
22
+|				 to the table name when using the  Active Record class
23
+|	['pconnect'] TRUE/FALSE - Whether to use a persistent connection
24
+|	['db_debug'] TRUE/FALSE - Whether database errors should be displayed.
25
+|	['cache_on'] TRUE/FALSE - Enables/disables query caching
26
+|	['cachedir'] The path to the folder where cache files should be stored
27
+|	['char_set'] The character set used in communicating with the database
28
+|	['dbcollat'] The character collation used in communicating with the database
29
+|
30
+| The $active_group variable lets you choose which connection group to
31
+| make active.  By mysql there is only one group (the "mysql" group).
32
+|
33
+| The $active_record variables lets you determine whether or not to load
34
+| the active record class
35
+*/
36
+
37
+$active_group = "todo";
38
+$active_record = TRUE;
39
+
40
+$db = [
41
+	'todo' => [
42
+		'hostname' => 'localhost',
43
+		'username' => 'root',
44
+		'password' => '',
45
+		'database' => 'todo_test',
46
+		'dbdriver' => 'mysqli',
47
+		'dbprefix' => 'todo_',
48
+		'pconnect' => FALSE,
49
+		'db_debug' => TRUE,
50
+		'cache_on' => FALSE,
51
+		'cachedir' => '',
52
+		'char_set' => 'utf8',
53
+		'dbcollat' => 'utf8_general_ci',
54
+		'swap_pre' => '',
55
+		'autoinit' => FALSE,
56
+		'stricton' => FALSE
57
+	]
58
+];
59
+
60
+
61
+/* End of file database.php */
62
+/* Location: ./system/application/config/database.php */

+ 62
- 0
application/config/testing-pgsql/database.php View File

@@ -0,0 +1,62 @@
1
+<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
2
+/*
3
+| -------------------------------------------------------------------
4
+| DATABASE CONNECTIVITY SETTINGS
5
+| -------------------------------------------------------------------
6
+| This file will contain the settings needed to access your database.
7
+|
8
+| For complete instructions please consult the "Database Connection"
9
+| page of the User Guide.
10
+|
11
+| -------------------------------------------------------------------
12
+| EXPLANATION OF VARIABLES
13
+| -------------------------------------------------------------------
14
+|
15
+|	['hostname'] The hostname of your database server.
16
+|	['username'] The username used to connect to the database
17
+|	['password'] The password used to connect to the database
18
+|	['database'] The name of the database you want to connect to
19
+|	['dbdriver'] The database type. ie: mysql.  Currently supported:
20
+				 mysql, mysqli, postgre, odbc, mssql, sqlite, oci8
21
+|	['dbprefix'] You can add an optional prefix, which will be added
22
+|				 to the table name when using the  Active Record class
23
+|	['pconnect'] TRUE/FALSE - Whether to use a persistent connection
24
+|	['db_debug'] TRUE/FALSE - Whether database errors should be displayed.
25
+|	['cache_on'] TRUE/FALSE - Enables/disables query caching
26
+|	['cachedir'] The path to the folder where cache files should be stored
27
+|	['char_set'] The character set used in communicating with the database
28
+|	['dbcollat'] The character collation used in communicating with the database
29
+|
30
+| The $active_group variable lets you choose which connection group to
31
+| make active.  By mysql there is only one group (the "mysql" group).
32
+|
33
+| The $active_record variables lets you determine whether or not to load
34
+| the active record class
35
+*/
36
+
37
+$active_group = "todo";
38
+$active_record = TRUE;
39
+
40
+$db = [
41
+	'todo' => [
42
+		'hostname' => 'localhost',
43
+		'username' => 'postgres',
44
+		'password' => '',
45
+		'database' => 'todo_test',
46
+		'dbdriver' => 'postgre',
47
+		'dbprefix' => 'todo_',
48
+		'pconnect' => FALSE,
49
+		'db_debug' => TRUE,
50
+		'cache_on' => FALSE,
51
+		'cachedir' => '',
52
+		'char_set' => 'utf8',
53
+		'dbcollat' => 'utf8_general_ci',
54
+		'swap_pre' => '',
55
+		'autoinit' => FALSE,
56
+		'stricton' => FALSE
57
+	]
58
+];
59
+
60
+
61
+/* End of file database.php */
62
+/* Location: ./system/application/config/database.php */