Skip to content

Commit

Permalink
[INTERNAL] Update circleci config #245
Browse files Browse the repository at this point in the history
- Updated to use pipelines
- Ensure tested on mysql
  • Loading branch information
kfdm authored Feb 28, 2020
2 parents 6f104d4 + ed7af40 commit c25cf6a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 8 deletions.
27 changes: 19 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
version: 2
version: 2.1

general:
branches:
ignore:
- gh-pages

jobs:
build:
branches:
ignore:
- gh-pages
docker:
- image: circleci/python:3.6.4
environment:
SECRET_KEY: abcd
DATABASE_URL: mysql://root:password@127.0.0.1/promgen?charset=utf8mb4
- image: mysql:5.7
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: test_promgen
steps:
- checkout
- run:
Expand All @@ -17,9 +26,11 @@ jobs:
curl -L -s https://github.com/prometheus/prometheus/releases/download/v2.8.1/prometheus-2.8.1.linux-amd64.tar.gz |\
sudo tar -xz -C /usr/local/bin --strip-components=1 prometheus-2.8.1.linux-amd64/promtool
sudo chmod +x /usr/local/bin/promtool
- run: pipenv install --dev
- run: pipenv run promgen test
- run: pipenv run coverage html -d test-results
- run: pipenv run codecov
- run: mkdir -p test-results
- run: python3 -m venv .venv
- run: .venv/bin/pip install -r docker/requirements.txt
- run: .venv/bin/pip install -e .[dev,mysql]
- run: .venv/bin/promgen test --with-xunit --xunit-file test-results/nosetests.xml --noinput
- run: .venv/bin/codecov
- store_test_results:
path: test-results
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
'codecov',
'django-nose',
'nose-cov',
'unittest-xml-reporting',
],
'docs': [
'Sphinx',
Expand Down

0 comments on commit c25cf6a

Please sign in to comment.