File tree Expand file tree Collapse file tree 1 file changed +54
-0
lines changed
Expand file tree Collapse file tree 1 file changed +54
-0
lines changed Original file line number Diff line number Diff line change 1+ version : 2
2+ jobs :
3+ build :
4+ docker :
5+ - image : circleci/buildpack-deps:18.04
6+
7+ - image : circleci/postgres:9.6-alpine-ram
8+
9+ - image : circleci/mysql:5.7-ram
10+ environment :
11+ MYSQL_ALLOW_EMPTY_PASSWORD=true
12+ MYSQL_ROOT_HOST=%
13+
14+ working_directory : ~/repo
15+
16+ steps :
17+ - checkout
18+
19+ - run :
20+ name : install packages
21+ command : |
22+ sudo apt-get update
23+ sudo apt-get install -y libgpgme-dev mysql-client-core-5.7 postgresql-client python3-gpg python3-mysqldb python3-pip python3-psycopg2 python3-pytest python3-pytest-cov python3-tz python3-venv python3-whoosh python3-xapian swig
24+
25+ - run :
26+ name : install dependencies
27+ command : |
28+ python3 -m venv venv
29+ . venv/bin/activate
30+ pip3 install codecov
31+
32+ - run :
33+ name : setup databases
34+ command : |
35+ psql -d postgresql://root@localhost/circle_test -c "CREATE ROLE rounduptest WITH CREATEDB LOGIN PASSWORD 'rounduptest';"
36+ mysql -h 127.0.0.1 -u root -e "GRANT ALL ON rounduptest.* TO rounduptest@'127.0.0.1' IDENTIFIED BY \"rounduptest\";"
37+ # patch host to 127.0.0.1 to force TCP connection to MySQL
38+ sed -i -e 's/\(config[.]RDBMS_HOST =\) "localhost"/\1 "127.0.0.1"/' test/db_test_base.py
39+ # HACK: workaround mysql bug: http://bugs.mysql.com/bug.php?id=74901
40+ # needed for test_mysql.mysqlDBTest.testFilteringSpecialChars
41+ sed -i -e 's/CREATE DATABASE \%s/CREATE DATABASE \%s COLLATE utf8_general_ci/' roundup/backends/back_mysql.py
42+
43+ - run :
44+ name : run tests
45+ command : |
46+ . venv/bin/activate
47+ py.test-3 -v test/ --cov=roundup
48+ environment :
49+ MYSQL_HOST : 127.0.0.1
50+
51+ - run :
52+ name : run coverage
53+ command : |
54+ codecov
You can’t perform that action at this time.
0 commit comments