Skip to content

Commit 90c0a5b

Browse files
committed
updated circleci config (still with some ugly workaround to rewrite to MySQL host on Debian)
1 parent 3577ade commit 90c0a5b

File tree

1 file changed

+22
-16
lines changed

1 file changed

+22
-16
lines changed

.circleci/config.yml

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,22 +31,23 @@ jobs:
3131
name: setup databases
3232
command: |
3333
psql -d postgresql://postgres@localhost/circle_test -c "CREATE ROLE rounduptest WITH CREATEDB LOGIN PASSWORD 'rounduptest';"
34-
mysql -h 127.0.0.1 -u root -e "CREATE USER 'rounduptest'@'127.0.0.1' IDENTIFIED BY 'rounduptest'; GRANT ALL ON rounduptest.* TO 'rounduptest'@'127.0.0.1';"
35-
# patch host to 127.0.0.1 to force TCP connection to MySQL
36-
sed -i -e 's/\(config[.]RDBMS_HOST =\) "localhost"/\1 "127.0.0.1"/' test/db_test_base.py
34+
echo -e "[client]\nprotocol=tcp\n" >~/.my.cnf
35+
mysql --print-defaults
36+
mysql -u root -e "CREATE USER 'rounduptest'@'127.0.0.1' IDENTIFIED BY 'rounduptest'; GRANT ALL ON rounduptest.* TO 'rounduptest'@'127.0.0.1';"
3737
3838
- run:
3939
name: run tests
4040
command: |
41-
py.test-3 -v test/ --cov=roundup
42-
environment:
43-
MYSQL_HOST: 127.0.0.1
41+
py.test-3 -v test/ --cov=roundup --junitxml test-results/ubuntu.xml
4442
4543
- run:
4644
name: run coverage
4745
command: |
4846
python3-coverage html -i
4947
48+
- store_test_results:
49+
path: test-results
50+
5051
- store_artifacts:
5152
path: htmlcov
5253
destination: roundup-ubuntu
@@ -82,22 +83,23 @@ jobs:
8283
name: setup databases
8384
command: |
8485
psql -d postgresql://postgres@localhost/circle_test -c "CREATE ROLE rounduptest WITH CREATEDB LOGIN PASSWORD 'rounduptest';"
85-
mysql -h 127.0.0.1 -u root -e "GRANT ALL ON rounduptest.* TO rounduptest@'127.0.0.1' IDENTIFIED BY \"rounduptest\";"
86-
# patch host to 127.0.0.1 to force TCP connection to MySQL
87-
sed -i -e 's/\(config[.]RDBMS_HOST =\) "localhost"/\1 "127.0.0.1"/' test/db_test_base.py
86+
echo -e "[client]\nprotocol=tcp\n" >~/.my.cnf
87+
mysql --print-defaults
88+
mysql -u root -e "CREATE USER 'rounduptest'@'127.0.0.1' IDENTIFIED BY 'rounduptest'; GRANT ALL ON rounduptest.* TO 'rounduptest'@'127.0.0.1';"
8889
8990
- run:
9091
name: run tests
9192
command: |
92-
py.test-3 -v test/ --cov=roundup
93-
environment:
94-
MYSQL_HOST: 127.0.0.1
93+
py.test-3 -v test/ --cov=roundup --junitxml test-results/ubuntu-old.xml
9594
9695
- run:
9796
name: run coverage
9897
command: |
9998
python3-coverage html -i
10099
100+
- store_test_results:
101+
path: test-results
102+
101103
- store_artifacts:
102104
path: htmlcov
103105
destination: roundup-ubuntu-old
@@ -133,22 +135,26 @@ jobs:
133135
name: setup databases
134136
command: |
135137
psql -d postgresql://postgres@localhost/circle_test -c "CREATE ROLE rounduptest WITH CREATEDB LOGIN PASSWORD 'rounduptest';"
136-
mysql -h 127.0.0.1 -u root -e "GRANT ALL ON rounduptest.* TO rounduptest@'127.0.0.1' IDENTIFIED BY \"rounduptest\";"
138+
echo -e "[client]\nprotocol=tcp\nhost=127.0.0.1\n" >~/.my.cnf
139+
mysql --print-defaults
140+
mysql -u root -e "CREATE USER 'rounduptest'@'127.0.0.1' IDENTIFIED BY 'rounduptest'; GRANT ALL ON rounduptest.* TO 'rounduptest'@'127.0.0.1';"
137141
# patch host to 127.0.0.1 to force TCP connection to MySQL
138142
sed -i -e 's/\(config[.]RDBMS_HOST =\) "localhost"/\1 "127.0.0.1"/' test/db_test_base.py
143+
sed -i -e 's/rdbms_name=\([^,]\+\),/rdbms_host=127.0.0.1,rdbms_name=\1,/' test/test_admin.py
139144
140145
- run:
141146
name: run tests
142147
command: |
143-
py.test-3 -v test/ --cov=roundup
144-
environment:
145-
MYSQL_HOST: 127.0.0.1
148+
py.test-3 -v test/ --cov=roundup --junitxml test-results/debian.xml
146149
147150
- run:
148151
name: run coverage
149152
command: |
150153
python3-coverage html -i
151154
155+
- store_test_results:
156+
path: test-results
157+
152158
- store_artifacts:
153159
path: htmlcov
154160
destination: roundup-debian

0 commit comments

Comments
 (0)