comparison .circleci/config.yml @ 6156:b3053fa6f3ee

Merge
author Ralf Schlatterbeck <rsc@runtux.com>
date Sat, 02 May 2020 22:24:41 +0200
parents 56554e9f5c51
children b85c01544cfe
comparison
equal deleted inserted replaced
6155:ba0cfc1a87c9 6156:b3053fa6f3ee
1 version: 2 1 version: 2
2 jobs: 2 jobs:
3 ubuntu: 3 ubuntu:
4 docker:
5 - image: circleci/buildpack-deps:20.04
6
7 - image: circleci/postgres:12-alpine-ram
8 environment:
9 POSTGRES_USER: postgres
10 POSTGRES_DB: circle_test
11
12 - image: circleci/mysql:8.0-ram
13 environment:
14 MYSQL_ALLOW_EMPTY_PASSWORD=true
15 MYSQL_ROOT_HOST=%
16
17 resource_class: small
18
19 working_directory: ~/repo
20
21 steps:
22 - checkout
23
24 - run:
25 name: install packages
26 command: |
27 sudo apt-get update
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
29
30 - run:
31 name: setup databases
32 command: |
33 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
37
38 - run:
39 name: run tests
40 command: |
41 py.test-3 -v test/ --cov=roundup
42 environment:
43 MYSQL_HOST: 127.0.0.1
44
45 - run:
46 name: run coverage
47 command: |
48 python3-coverage html -i
49
50 - store_artifacts:
51 path: htmlcov
52 destination: roundup-ubuntu
53
54 ubuntu-old:
4 docker: 55 docker:
5 - image: circleci/buildpack-deps:18.04 56 - image: circleci/buildpack-deps:18.04
6 57
7 - image: circleci/postgres:10-alpine-ram 58 - image: circleci/postgres:10-alpine-ram
8 environment: 59 environment:
32 command: | 83 command: |
33 psql -d postgresql://postgres@localhost/circle_test -c "CREATE ROLE rounduptest WITH CREATEDB LOGIN PASSWORD 'rounduptest';" 84 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 "GRANT ALL ON rounduptest.* TO rounduptest@'127.0.0.1' IDENTIFIED BY \"rounduptest\";" 85 mysql -h 127.0.0.1 -u root -e "GRANT ALL ON rounduptest.* TO rounduptest@'127.0.0.1' IDENTIFIED BY \"rounduptest\";"
35 # patch host to 127.0.0.1 to force TCP connection to MySQL 86 # 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 87 sed -i -e 's/\(config[.]RDBMS_HOST =\) "localhost"/\1 "127.0.0.1"/' test/db_test_base.py
37 # HACK: workaround mysql bug: http://bugs.mysql.com/bug.php?id=74901
38 # needed for test_mysql.mysqlDBTest.testFilteringSpecialChars
39 sed -i -e 's/CREATE DATABASE \%s/CREATE DATABASE \%s COLLATE utf8_general_ci/' roundup/backends/back_mysql.py
40 88
41 - run: 89 - run:
42 name: run tests 90 name: run tests
43 command: | 91 command: |
44 py.test-3 -v test/ --cov=roundup 92 py.test-3 -v test/ --cov=roundup
50 command: | 98 command: |
51 python3-coverage html -i 99 python3-coverage html -i
52 100
53 - store_artifacts: 101 - store_artifacts:
54 path: htmlcov 102 path: htmlcov
55 destination: roundup-ubuntu 103 destination: roundup-ubuntu-old
56 104
57 debian: 105 debian:
58 docker: 106 docker:
59 - image: circleci/buildpack-deps:buster 107 - image: circleci/buildpack-deps:buster
60 108
86 command: | 134 command: |
87 psql -d postgresql://postgres@localhost/circle_test -c "CREATE ROLE rounduptest WITH CREATEDB LOGIN PASSWORD 'rounduptest';" 135 psql -d postgresql://postgres@localhost/circle_test -c "CREATE ROLE rounduptest WITH CREATEDB LOGIN PASSWORD 'rounduptest';"
88 mysql -h 127.0.0.1 -u root -e "GRANT ALL ON rounduptest.* TO rounduptest@'127.0.0.1' IDENTIFIED BY \"rounduptest\";" 136 mysql -h 127.0.0.1 -u root -e "GRANT ALL ON rounduptest.* TO rounduptest@'127.0.0.1' IDENTIFIED BY \"rounduptest\";"
89 # patch host to 127.0.0.1 to force TCP connection to MySQL 137 # patch host to 127.0.0.1 to force TCP connection to MySQL
90 sed -i -e 's/\(config[.]RDBMS_HOST =\) "localhost"/\1 "127.0.0.1"/' test/db_test_base.py 138 sed -i -e 's/\(config[.]RDBMS_HOST =\) "localhost"/\1 "127.0.0.1"/' test/db_test_base.py
91 # HACK: workaround mysql bug: http://bugs.mysql.com/bug.php?id=74901
92 # needed for test_mysql.mysqlDBTest.testFilteringSpecialChars
93 sed -i -e 's/CREATE DATABASE \%s/CREATE DATABASE \%s COLLATE utf8_general_ci/' roundup/backends/back_mysql.py
94 139
95 - run: 140 - run:
96 name: run tests 141 name: run tests
97 command: | 142 command: |
98 py.test-3 -v test/ --cov=roundup 143 py.test-3 -v test/ --cov=roundup
111 workflows: 156 workflows:
112 version: 2 157 version: 2
113 test_all: 158 test_all:
114 jobs: 159 jobs:
115 - ubuntu 160 - ubuntu
161 - ubuntu-old
116 - debian 162 - debian

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