Mercurial > p > roundup > code
comparison .circleci/config.yml @ 6231:b85c01544cfe
updated circleci config (still with some ugly workaround to rewrite to MySQL host on Debian)
| author | Christof Meerwald <cmeerw@cmeerw.org> |
|---|---|
| date | Sun, 26 Jul 2020 17:00:57 +0100 |
| parents | 56554e9f5c51 |
| children |
comparison
equal
deleted
inserted
replaced
| 6230:175c5064476e | 6231:b85c01544cfe |
|---|---|
| 29 | 29 |
| 30 - run: | 30 - run: |
| 31 name: setup databases | 31 name: setup databases |
| 32 command: | | 32 command: | |
| 33 psql -d postgresql://postgres@localhost/circle_test -c "CREATE ROLE rounduptest WITH CREATEDB LOGIN PASSWORD 'rounduptest';" | 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';" | 34 echo -e "[client]\nprotocol=tcp\n" >~/.my.cnf |
| 35 # patch host to 127.0.0.1 to force TCP connection to MySQL | 35 mysql --print-defaults |
| 36 sed -i -e 's/\(config[.]RDBMS_HOST =\) "localhost"/\1 "127.0.0.1"/' test/db_test_base.py | 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';" |
| 37 | 37 |
| 38 - run: | 38 - run: |
| 39 name: run tests | 39 name: run tests |
| 40 command: | | 40 command: | |
| 41 py.test-3 -v test/ --cov=roundup | 41 py.test-3 -v test/ --cov=roundup --junitxml test-results/ubuntu.xml |
| 42 environment: | |
| 43 MYSQL_HOST: 127.0.0.1 | |
| 44 | 42 |
| 45 - run: | 43 - run: |
| 46 name: run coverage | 44 name: run coverage |
| 47 command: | | 45 command: | |
| 48 python3-coverage html -i | 46 python3-coverage html -i |
| 47 | |
| 48 - store_test_results: | |
| 49 path: test-results | |
| 49 | 50 |
| 50 - store_artifacts: | 51 - store_artifacts: |
| 51 path: htmlcov | 52 path: htmlcov |
| 52 destination: roundup-ubuntu | 53 destination: roundup-ubuntu |
| 53 | 54 |
| 80 | 81 |
| 81 - run: | 82 - run: |
| 82 name: setup databases | 83 name: setup databases |
| 83 command: | | 84 command: | |
| 84 psql -d postgresql://postgres@localhost/circle_test -c "CREATE ROLE rounduptest WITH CREATEDB LOGIN PASSWORD 'rounduptest';" | 85 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 echo -e "[client]\nprotocol=tcp\n" >~/.my.cnf |
| 86 # patch host to 127.0.0.1 to force TCP connection to MySQL | 87 mysql --print-defaults |
| 87 sed -i -e 's/\(config[.]RDBMS_HOST =\) "localhost"/\1 "127.0.0.1"/' test/db_test_base.py | 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';" |
| 88 | 89 |
| 89 - run: | 90 - run: |
| 90 name: run tests | 91 name: run tests |
| 91 command: | | 92 command: | |
| 92 py.test-3 -v test/ --cov=roundup | 93 py.test-3 -v test/ --cov=roundup --junitxml test-results/ubuntu-old.xml |
| 93 environment: | |
| 94 MYSQL_HOST: 127.0.0.1 | |
| 95 | 94 |
| 96 - run: | 95 - run: |
| 97 name: run coverage | 96 name: run coverage |
| 98 command: | | 97 command: | |
| 99 python3-coverage html -i | 98 python3-coverage html -i |
| 99 | |
| 100 - store_test_results: | |
| 101 path: test-results | |
| 100 | 102 |
| 101 - store_artifacts: | 103 - store_artifacts: |
| 102 path: htmlcov | 104 path: htmlcov |
| 103 destination: roundup-ubuntu-old | 105 destination: roundup-ubuntu-old |
| 104 | 106 |
| 131 | 133 |
| 132 - run: | 134 - run: |
| 133 name: setup databases | 135 name: setup databases |
| 134 command: | | 136 command: | |
| 135 psql -d postgresql://postgres@localhost/circle_test -c "CREATE ROLE rounduptest WITH CREATEDB LOGIN PASSWORD 'rounduptest';" | 137 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';" | |
| 137 # patch host to 127.0.0.1 to force TCP connection to MySQL | 141 # patch host to 127.0.0.1 to force TCP connection to MySQL |
| 138 sed -i -e 's/\(config[.]RDBMS_HOST =\) "localhost"/\1 "127.0.0.1"/' test/db_test_base.py | 142 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 | |
| 139 | 144 |
| 140 - run: | 145 - run: |
| 141 name: run tests | 146 name: run tests |
| 142 command: | | 147 command: | |
| 143 py.test-3 -v test/ --cov=roundup | 148 py.test-3 -v test/ --cov=roundup --junitxml test-results/debian.xml |
| 144 environment: | |
| 145 MYSQL_HOST: 127.0.0.1 | |
| 146 | 149 |
| 147 - run: | 150 - run: |
| 148 name: run coverage | 151 name: run coverage |
| 149 command: | | 152 command: | |
| 150 python3-coverage html -i | 153 python3-coverage html -i |
| 154 | |
| 155 - store_test_results: | |
| 156 path: test-results | |
| 151 | 157 |
| 152 - store_artifacts: | 158 - store_artifacts: |
| 153 path: htmlcov | 159 path: htmlcov |
| 154 destination: roundup-debian | 160 destination: roundup-debian |
| 155 | 161 |
