File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11language : crystal
22script :
3- - crystal spec
3+ - crystal spec -D $DB_TYPE
44 - crystal tool format --check
55services :
66 - mysql
@@ -18,11 +18,9 @@ before_script:
1818 - psql -c 'create database crecto_test;' -U postgres
1919 - psql $PG_URL < spec/migrations/pg_migrations.sql
2020 - sqlite3 ./crecto_test.db < spec/migrations/sqlite3_migrations.sql
21- - if [ ! -z "$PG_URL" ]; then cp ./spec/travis_pg_repo.cr ./spec/repo.cr; fi
22- - if [ ! -z "$MYSQL_URL" ]; then cp ./spec/travis_mysql_repo.cr ./spec/repo.cr; fi
23- - if [ ! -z "$SQLITE3_PATH" ]; then cp ./spec/travis_sqlite_repo.cr ./spec/repo.cr; fi
21+ - cp ./spec/travis_${DB_TYPE}_repo.cr ./spec/repo.cr
2422env :
2523 matrix :
26- - PG_URL=postgres://postgres@localhost:5432/crecto_test
27- - MYSQL_URL=mysql://root@localhost/crecto_test
28- - SQLITE3_PATH=sqlite3://./crecto_test.db
24+ - PG_URL=postgres://postgres@localhost:5432/crecto_test DB_TYPE=pg
25+ - MYSQL_URL=mysql://root@localhost/crecto_test DB_TYPE=mysql
26+ - SQLITE3_PATH=sqlite3://./crecto_test.db DB_TYPE=sqlite
Original file line number Diff line number Diff line change @@ -337,7 +337,12 @@ describe Crecto do
337337 Repo .all(User , Query .where(name: " perform_all_io2oj999" )).size.should eq 0
338338 end
339339
340- it " allows reading records inserted inside the transaction" do
340+ # This only works for postgres for now
341+ {% if flag?(:pg ) % }
342+ it " allows reading records inserted inside the transaction" do
343+ {% else % }
344+ pending " allows reading records inserted inside the transaction" do
345+ {% end % }
341346 insert_user = User .new
342347 insert_user.name = " insert_user"
343348
You can’t perform that action at this time.
0 commit comments