Mercurial > p > roundup > code
annotate .circleci/config.yml @ 6154:56554e9f5c51
added python3-markdown2 package dependency for Ubuntu 20.04 test
| author | Christof Meerwald <cmeerw@cmeerw.org> |
|---|---|
| date | Fri, 01 May 2020 19:16:37 +0100 |
| parents | a327e2bdc02d |
| children | b85c01544cfe |
| rev | line source |
|---|---|
|
5509
851d4306300d
added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff
changeset
|
1 version: 2 |
|
851d4306300d
added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff
changeset
|
2 jobs: |
|
6115
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
3 ubuntu: |
|
5509
851d4306300d
added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff
changeset
|
4 docker: |
|
6153
a327e2bdc02d
updated circleci config to also test on Ubuntu 20.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
6115
diff
changeset
|
5 - image: circleci/buildpack-deps:20.04 |
|
a327e2bdc02d
updated circleci config to also test on Ubuntu 20.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
6115
diff
changeset
|
6 |
|
a327e2bdc02d
updated circleci config to also test on Ubuntu 20.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
6115
diff
changeset
|
7 - image: circleci/postgres:12-alpine-ram |
|
a327e2bdc02d
updated circleci config to also test on Ubuntu 20.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
6115
diff
changeset
|
8 environment: |
|
a327e2bdc02d
updated circleci config to also test on Ubuntu 20.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
6115
diff
changeset
|
9 POSTGRES_USER: postgres |
|
a327e2bdc02d
updated circleci config to also test on Ubuntu 20.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
6115
diff
changeset
|
10 POSTGRES_DB: circle_test |
|
a327e2bdc02d
updated circleci config to also test on Ubuntu 20.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
6115
diff
changeset
|
11 |
|
a327e2bdc02d
updated circleci config to also test on Ubuntu 20.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
6115
diff
changeset
|
12 - image: circleci/mysql:8.0-ram |
|
a327e2bdc02d
updated circleci config to also test on Ubuntu 20.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
6115
diff
changeset
|
13 environment: |
|
a327e2bdc02d
updated circleci config to also test on Ubuntu 20.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
6115
diff
changeset
|
14 MYSQL_ALLOW_EMPTY_PASSWORD=true |
|
a327e2bdc02d
updated circleci config to also test on Ubuntu 20.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
6115
diff
changeset
|
15 MYSQL_ROOT_HOST=% |
|
a327e2bdc02d
updated circleci config to also test on Ubuntu 20.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
6115
diff
changeset
|
16 |
|
a327e2bdc02d
updated circleci config to also test on Ubuntu 20.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
6115
diff
changeset
|
17 resource_class: small |
|
a327e2bdc02d
updated circleci config to also test on Ubuntu 20.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
6115
diff
changeset
|
18 |
|
a327e2bdc02d
updated circleci config to also test on Ubuntu 20.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
6115
diff
changeset
|
19 working_directory: ~/repo |
|
a327e2bdc02d
updated circleci config to also test on Ubuntu 20.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
6115
diff
changeset
|
20 |
|
a327e2bdc02d
updated circleci config to also test on Ubuntu 20.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
6115
diff
changeset
|
21 steps: |
|
a327e2bdc02d
updated circleci config to also test on Ubuntu 20.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
6115
diff
changeset
|
22 - checkout |
|
a327e2bdc02d
updated circleci config to also test on Ubuntu 20.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
6115
diff
changeset
|
23 |
|
a327e2bdc02d
updated circleci config to also test on Ubuntu 20.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
6115
diff
changeset
|
24 - run: |
|
a327e2bdc02d
updated circleci config to also test on Ubuntu 20.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
6115
diff
changeset
|
25 name: install packages |
|
a327e2bdc02d
updated circleci config to also test on Ubuntu 20.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
6115
diff
changeset
|
26 command: | |
|
a327e2bdc02d
updated circleci config to also test on Ubuntu 20.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
6115
diff
changeset
|
27 sudo apt-get update |
|
6154
56554e9f5c51
added python3-markdown2 package dependency for Ubuntu 20.04 test
Christof Meerwald <cmeerw@cmeerw.org>
parents:
6153
diff
changeset
|
28 sudo apt-get install -y libgpgme-dev default-mysql-client-core postgresql-client python3-docutils python3-gpg python3-jwt python3-markdown python3-markdown2 python3-mistune python3-mysqldb python3-pip python3-psycopg2 python3-pytest python3-pytest-cov python3-tz python3-venv python3-whoosh python3-xapian swig |
|
6153
a327e2bdc02d
updated circleci config to also test on Ubuntu 20.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
6115
diff
changeset
|
29 |
|
a327e2bdc02d
updated circleci config to also test on Ubuntu 20.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
6115
diff
changeset
|
30 - run: |
|
a327e2bdc02d
updated circleci config to also test on Ubuntu 20.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
6115
diff
changeset
|
31 name: setup databases |
|
a327e2bdc02d
updated circleci config to also test on Ubuntu 20.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
6115
diff
changeset
|
32 command: | |
|
a327e2bdc02d
updated circleci config to also test on Ubuntu 20.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
6115
diff
changeset
|
33 psql -d postgresql://postgres@localhost/circle_test -c "CREATE ROLE rounduptest WITH CREATEDB LOGIN PASSWORD 'rounduptest';" |
|
a327e2bdc02d
updated circleci config to also test on Ubuntu 20.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
6115
diff
changeset
|
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';" |
|
a327e2bdc02d
updated circleci config to also test on Ubuntu 20.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
6115
diff
changeset
|
35 # patch host to 127.0.0.1 to force TCP connection to MySQL |
|
a327e2bdc02d
updated circleci config to also test on Ubuntu 20.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
6115
diff
changeset
|
36 sed -i -e 's/\(config[.]RDBMS_HOST =\) "localhost"/\1 "127.0.0.1"/' test/db_test_base.py |
|
a327e2bdc02d
updated circleci config to also test on Ubuntu 20.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
6115
diff
changeset
|
37 |
|
a327e2bdc02d
updated circleci config to also test on Ubuntu 20.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
6115
diff
changeset
|
38 - run: |
|
a327e2bdc02d
updated circleci config to also test on Ubuntu 20.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
6115
diff
changeset
|
39 name: run tests |
|
a327e2bdc02d
updated circleci config to also test on Ubuntu 20.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
6115
diff
changeset
|
40 command: | |
|
a327e2bdc02d
updated circleci config to also test on Ubuntu 20.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
6115
diff
changeset
|
41 py.test-3 -v test/ --cov=roundup |
|
a327e2bdc02d
updated circleci config to also test on Ubuntu 20.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
6115
diff
changeset
|
42 environment: |
|
a327e2bdc02d
updated circleci config to also test on Ubuntu 20.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
6115
diff
changeset
|
43 MYSQL_HOST: 127.0.0.1 |
|
a327e2bdc02d
updated circleci config to also test on Ubuntu 20.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
6115
diff
changeset
|
44 |
|
a327e2bdc02d
updated circleci config to also test on Ubuntu 20.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
6115
diff
changeset
|
45 - run: |
|
a327e2bdc02d
updated circleci config to also test on Ubuntu 20.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
6115
diff
changeset
|
46 name: run coverage |
|
a327e2bdc02d
updated circleci config to also test on Ubuntu 20.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
6115
diff
changeset
|
47 command: | |
|
a327e2bdc02d
updated circleci config to also test on Ubuntu 20.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
6115
diff
changeset
|
48 python3-coverage html -i |
|
a327e2bdc02d
updated circleci config to also test on Ubuntu 20.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
6115
diff
changeset
|
49 |
|
a327e2bdc02d
updated circleci config to also test on Ubuntu 20.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
6115
diff
changeset
|
50 - store_artifacts: |
|
a327e2bdc02d
updated circleci config to also test on Ubuntu 20.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
6115
diff
changeset
|
51 path: htmlcov |
|
a327e2bdc02d
updated circleci config to also test on Ubuntu 20.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
6115
diff
changeset
|
52 destination: roundup-ubuntu |
|
a327e2bdc02d
updated circleci config to also test on Ubuntu 20.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
6115
diff
changeset
|
53 |
|
a327e2bdc02d
updated circleci config to also test on Ubuntu 20.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
6115
diff
changeset
|
54 ubuntu-old: |
|
a327e2bdc02d
updated circleci config to also test on Ubuntu 20.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
6115
diff
changeset
|
55 docker: |
|
5509
851d4306300d
added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff
changeset
|
56 - image: circleci/buildpack-deps:18.04 |
|
851d4306300d
added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff
changeset
|
57 |
|
6115
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
58 - image: circleci/postgres:10-alpine-ram |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
59 environment: |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
60 POSTGRES_USER: postgres |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
61 POSTGRES_DB: circle_test |
|
5509
851d4306300d
added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff
changeset
|
62 |
|
851d4306300d
added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff
changeset
|
63 - image: circleci/mysql:5.7-ram |
|
851d4306300d
added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff
changeset
|
64 environment: |
|
851d4306300d
added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff
changeset
|
65 MYSQL_ALLOW_EMPTY_PASSWORD=true |
|
851d4306300d
added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff
changeset
|
66 MYSQL_ROOT_HOST=% |
|
851d4306300d
added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff
changeset
|
67 |
|
6115
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
68 resource_class: small |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
69 |
|
5509
851d4306300d
added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff
changeset
|
70 working_directory: ~/repo |
|
851d4306300d
added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff
changeset
|
71 |
|
851d4306300d
added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff
changeset
|
72 steps: |
|
851d4306300d
added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff
changeset
|
73 - checkout |
|
851d4306300d
added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff
changeset
|
74 |
|
851d4306300d
added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff
changeset
|
75 - run: |
|
851d4306300d
added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff
changeset
|
76 name: install packages |
|
851d4306300d
added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff
changeset
|
77 command: | |
|
851d4306300d
added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff
changeset
|
78 sudo apt-get update |
|
6115
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
79 sudo apt-get install -y libgpgme-dev default-mysql-client-core postgresql-client python3-docutils python3-gpg python3-jwt python3-markdown python3-mistune python3-mysqldb python3-pip python3-psycopg2 python3-pytest python3-pytest-cov python3-tz python3-venv python3-whoosh python3-xapian swig |
|
5509
851d4306300d
added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff
changeset
|
80 |
|
851d4306300d
added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff
changeset
|
81 - run: |
|
851d4306300d
added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff
changeset
|
82 name: setup databases |
|
851d4306300d
added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff
changeset
|
83 command: | |
|
6115
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
84 psql -d postgresql://postgres@localhost/circle_test -c "CREATE ROLE rounduptest WITH CREATEDB LOGIN PASSWORD 'rounduptest';" |
|
5509
851d4306300d
added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff
changeset
|
85 mysql -h 127.0.0.1 -u root -e "GRANT ALL ON rounduptest.* TO rounduptest@'127.0.0.1' IDENTIFIED BY \"rounduptest\";" |
|
851d4306300d
added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff
changeset
|
86 # patch host to 127.0.0.1 to force TCP connection to MySQL |
|
851d4306300d
added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff
changeset
|
87 sed -i -e 's/\(config[.]RDBMS_HOST =\) "localhost"/\1 "127.0.0.1"/' test/db_test_base.py |
|
851d4306300d
added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff
changeset
|
88 |
|
851d4306300d
added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff
changeset
|
89 - run: |
|
851d4306300d
added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff
changeset
|
90 name: run tests |
|
851d4306300d
added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff
changeset
|
91 command: | |
|
851d4306300d
added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff
changeset
|
92 py.test-3 -v test/ --cov=roundup |
|
851d4306300d
added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff
changeset
|
93 environment: |
|
851d4306300d
added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff
changeset
|
94 MYSQL_HOST: 127.0.0.1 |
|
851d4306300d
added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff
changeset
|
95 |
|
851d4306300d
added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff
changeset
|
96 - run: |
|
851d4306300d
added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff
changeset
|
97 name: run coverage |
|
851d4306300d
added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff
changeset
|
98 command: | |
|
6115
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
99 python3-coverage html -i |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
100 |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
101 - store_artifacts: |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
102 path: htmlcov |
|
6153
a327e2bdc02d
updated circleci config to also test on Ubuntu 20.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
6115
diff
changeset
|
103 destination: roundup-ubuntu-old |
|
6115
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
104 |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
105 debian: |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
106 docker: |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
107 - image: circleci/buildpack-deps:buster |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
108 |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
109 - image: circleci/postgres:11-alpine-ram |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
110 environment: |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
111 POSTGRES_USER: postgres |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
112 POSTGRES_DB: circle_test |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
113 |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
114 - image: circleci/mariadb:10.3-ram |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
115 environment: |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
116 MYSQL_ALLOW_EMPTY_PASSWORD=true |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
117 MYSQL_ROOT_HOST=% |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
118 |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
119 resource_class: small |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
120 |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
121 working_directory: ~/repo |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
122 |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
123 steps: |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
124 - checkout |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
125 |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
126 - run: |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
127 name: install packages |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
128 command: | |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
129 sudo apt-get update |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
130 sudo apt-get install -y libgpgme-dev default-mysql-client-core postgresql-client python3-docutils python3-gpg python3-jwt python3-markdown python3-markdown2 python3-mistune python3-mysqldb python3-pip python3-psycopg2 python3-pytest python3-pytest-cov python3-tz python3-venv python3-whoosh python3-xapian swig |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
131 |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
132 - run: |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
133 name: setup databases |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
134 command: | |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
135 psql -d postgresql://postgres@localhost/circle_test -c "CREATE ROLE rounduptest WITH CREATEDB LOGIN PASSWORD 'rounduptest';" |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
136 mysql -h 127.0.0.1 -u root -e "GRANT ALL ON rounduptest.* TO rounduptest@'127.0.0.1' IDENTIFIED BY \"rounduptest\";" |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
137 # patch host to 127.0.0.1 to force TCP connection to MySQL |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
138 sed -i -e 's/\(config[.]RDBMS_HOST =\) "localhost"/\1 "127.0.0.1"/' test/db_test_base.py |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
139 |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
140 - run: |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
141 name: run tests |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
142 command: | |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
143 py.test-3 -v test/ --cov=roundup |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
144 environment: |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
145 MYSQL_HOST: 127.0.0.1 |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
146 |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
147 - run: |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
148 name: run coverage |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
149 command: | |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
150 python3-coverage html -i |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
151 |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
152 - store_artifacts: |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
153 path: htmlcov |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
154 destination: roundup-debian |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
155 |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
156 workflows: |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
157 version: 2 |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
158 test_all: |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
159 jobs: |
|
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
160 - ubuntu |
|
6153
a327e2bdc02d
updated circleci config to also test on Ubuntu 20.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
6115
diff
changeset
|
161 - ubuntu-old |
|
6115
7017ea98930f
updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents:
5509
diff
changeset
|
162 - debian |
