Test both PostgreSQL and MySQL for the win
I expect all tests with MySQL should pass, while it's possible that some of the PostgreSQL tests didn't pass because we're not testing them right now.
This merge request/branch would no longer run mysql tests. Check this branch when we're running mysql: https://gitlab.com/gitlab-org/gitlab-ce/commits/test-pg-mysql (i.e. append -mysql to the branch name)
Summary
- We run all database related tests for everything, including PostgreSQL and MySQL (e.g.
rake db:rollback
) (in the future we could wrap this with a check that if it's not touching related files, we don't run it in merge requests) - For tests which database isn't important (e.g.
rake karma
), but we still need to have it setup, we use PostgreSQL - We run everything for EE on GitLab.com and dev
- We run everything for CE on master and tags (both GitLab.com and dev)
- We run everything if the branch name ends with
-mysql
(seetest-pg-mysql
vstest-pg
) - Otherwise we only run PostgreSQL tests
- We install both pg and mysql2 gem, I think this is ok
- We really need to
bundle install
beforegem install knapsack
, otherwise some natives gems could not be found! For example,mysql2
,allocations
, andrblineprof
, etc. I completely have no idea why and wasted for several hours due to this. - I tried to move some scripts into their own shell scripts to make it easier to maintain
- I expect to see more transient errors/failures after switching to PostgreSQL as our main testing database, e.g.
Oh, and for now I am using my docker image registry.gitlab.com/godfat/gitlab-build-images:ruby-2.3.3-git-2.7-phantomjs-2.1-node-7.1-postgresql-9.6
before we merge gitlab-build-images!29 (merged) We should probably consider rename this. This is for using PostgreSQL 9.6 rather than 9.4, otherwise a test would fail with pg_dump
saying that 9.4 doesn't match 9.6
Closes #2582 (closed)