annotate .circleci/config.yml @ 6115:7017ea98930f

updated circleci config to test on both ubuntu and debian
author Christof Meerwald <cmeerw@cmeerw.org>
date Sat, 29 Feb 2020 15:17:28 +0000
parents 851d4306300d
children a327e2bdc02d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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:
851d4306300d added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff changeset
5 - image: circleci/buildpack-deps:18.04
851d4306300d added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff changeset
6
6115
7017ea98930f updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5509
diff changeset
7 - 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
8 environment:
7017ea98930f updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5509
diff changeset
9 POSTGRES_USER: postgres
7017ea98930f updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5509
diff changeset
10 POSTGRES_DB: circle_test
5509
851d4306300d added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff changeset
11
851d4306300d added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff changeset
12 - image: circleci/mysql:5.7-ram
851d4306300d added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff changeset
13 environment:
851d4306300d added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff changeset
14 MYSQL_ALLOW_EMPTY_PASSWORD=true
851d4306300d added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff changeset
15 MYSQL_ROOT_HOST=%
851d4306300d added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff changeset
16
6115
7017ea98930f updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5509
diff changeset
17 resource_class: small
7017ea98930f updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5509
diff changeset
18
5509
851d4306300d added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff changeset
19 working_directory: ~/repo
851d4306300d added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff changeset
20
851d4306300d added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff changeset
21 steps:
851d4306300d added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff changeset
22 - checkout
851d4306300d added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff changeset
23
851d4306300d added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff changeset
24 - run:
851d4306300d added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff changeset
25 name: install packages
851d4306300d added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff changeset
26 command: |
851d4306300d added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff changeset
27 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
28 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
29
851d4306300d added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff changeset
30 - run:
851d4306300d added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff changeset
31 name: setup databases
851d4306300d added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff changeset
32 command: |
6115
7017ea98930f updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5509
diff changeset
33 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
34 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
35 # 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
36 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
37 # HACK: workaround mysql bug: http://bugs.mysql.com/bug.php?id=74901
851d4306300d added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff changeset
38 # needed for test_mysql.mysqlDBTest.testFilteringSpecialChars
851d4306300d added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff changeset
39 sed -i -e 's/CREATE DATABASE \%s/CREATE DATABASE \%s COLLATE utf8_general_ci/' roundup/backends/back_mysql.py
851d4306300d added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff changeset
40
851d4306300d added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff changeset
41 - run:
851d4306300d added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff changeset
42 name: run tests
851d4306300d added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff changeset
43 command: |
851d4306300d added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff changeset
44 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
45 environment:
851d4306300d added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff changeset
46 MYSQL_HOST: 127.0.0.1
851d4306300d added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff changeset
47
851d4306300d added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff changeset
48 - run:
851d4306300d added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff changeset
49 name: run coverage
851d4306300d added circleci configuration to test on Ubuntu 18.04
Christof Meerwald <cmeerw@cmeerw.org>
parents:
diff changeset
50 command: |
6115
7017ea98930f updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5509
diff changeset
51 python3-coverage html -i
7017ea98930f updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5509
diff changeset
52
7017ea98930f updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5509
diff changeset
53 - store_artifacts:
7017ea98930f updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5509
diff changeset
54 path: htmlcov
7017ea98930f updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5509
diff changeset
55 destination: roundup-ubuntu
7017ea98930f updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5509
diff changeset
56
7017ea98930f updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5509
diff changeset
57 debian:
7017ea98930f updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5509
diff changeset
58 docker:
7017ea98930f updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5509
diff changeset
59 - 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
60
7017ea98930f updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5509
diff changeset
61 - 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
62 environment:
7017ea98930f updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5509
diff changeset
63 POSTGRES_USER: postgres
7017ea98930f updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5509
diff changeset
64 POSTGRES_DB: circle_test
7017ea98930f updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5509
diff changeset
65
7017ea98930f updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5509
diff changeset
66 - 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
67 environment:
7017ea98930f updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5509
diff changeset
68 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
69 MYSQL_ROOT_HOST=%
7017ea98930f updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5509
diff changeset
70
7017ea98930f updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5509
diff changeset
71 resource_class: small
7017ea98930f updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5509
diff changeset
72
7017ea98930f updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5509
diff changeset
73 working_directory: ~/repo
7017ea98930f updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5509
diff changeset
74
7017ea98930f updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5509
diff changeset
75 steps:
7017ea98930f updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5509
diff changeset
76 - checkout
7017ea98930f updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5509
diff changeset
77
7017ea98930f updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5509
diff changeset
78 - run:
7017ea98930f updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5509
diff changeset
79 name: install packages
7017ea98930f updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5509
diff changeset
80 command: |
7017ea98930f updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5509
diff changeset
81 sudo apt-get update
7017ea98930f updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5509
diff changeset
82 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
83
7017ea98930f updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5509
diff changeset
84 - run:
7017ea98930f updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5509
diff changeset
85 name: setup databases
7017ea98930f updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5509
diff changeset
86 command: |
7017ea98930f updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5509
diff changeset
87 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
88 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
89 # 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
90 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
91 # HACK: workaround mysql bug: http://bugs.mysql.com/bug.php?id=74901
7017ea98930f updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5509
diff changeset
92 # needed for test_mysql.mysqlDBTest.testFilteringSpecialChars
7017ea98930f updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5509
diff changeset
93 sed -i -e 's/CREATE DATABASE \%s/CREATE DATABASE \%s COLLATE utf8_general_ci/' roundup/backends/back_mysql.py
7017ea98930f updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5509
diff changeset
94
7017ea98930f updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5509
diff changeset
95 - run:
7017ea98930f updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5509
diff changeset
96 name: run tests
7017ea98930f updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5509
diff changeset
97 command: |
7017ea98930f updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5509
diff changeset
98 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
99 environment:
7017ea98930f updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5509
diff changeset
100 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
101
7017ea98930f updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5509
diff changeset
102 - run:
7017ea98930f updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5509
diff changeset
103 name: run coverage
7017ea98930f updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5509
diff changeset
104 command: |
7017ea98930f updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5509
diff changeset
105 python3-coverage html -i
7017ea98930f updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5509
diff changeset
106
7017ea98930f updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5509
diff changeset
107 - store_artifacts:
7017ea98930f updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5509
diff changeset
108 path: htmlcov
7017ea98930f updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5509
diff changeset
109 destination: roundup-debian
7017ea98930f updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5509
diff changeset
110
7017ea98930f updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5509
diff changeset
111 workflows:
7017ea98930f updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5509
diff changeset
112 version: 2
7017ea98930f updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5509
diff changeset
113 test_all:
7017ea98930f updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5509
diff changeset
114 jobs:
7017ea98930f updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5509
diff changeset
115 - ubuntu
7017ea98930f updated circleci config to test on both ubuntu and debian
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5509
diff changeset
116 - debian

Roundup Issue Tracker: http://roundup-tracker.org/