From fa4a942d365a4aa5e894f84aa3fe1492bdac36d0 Mon Sep 17 00:00:00 2001 From: netzulo Date: Wed, 4 Jul 2018 02:13:47 +0200 Subject: [PATCH] [tl-tests] add CIs, codeclimate+appveyor --- .circleci/config.yml | 49 ++++++++++++++++++++++++++++++++++++++++++++ README.rst | 6 ++++-- 2 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..33615c9 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,49 @@ +# Python CircleCI 2.0 configuration file +version: 2 +jobs: + build: + environment: + CC_TEST_REPORTER_ID: 181a274c2c68483ff80af63a8a87e1f5fab71f37744eab702f25695501b5ca85 + docker: + - image: circleci/python:3.6.1 + + working_directory: ~/repo + + steps: + - checkout + - run: + name: Install dependencies + command: | + # CI, CircleCI dependencies + python3 -m venv venv + . venv/bin/activate + # CI, codeclimate dependencies + curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter + chmod +x ./cc-test-reporter + pip install codeclimate-test-reporter + # project dependencies + pip install tox + pip install coverage==4.2 + - run: + name: Install project + command: | + . venv/bin/activate + python setup.py install + - run: + name: Before Tests + command: | + ./cc-test-reporter before-build + - run: + name: Run Tests + command: | + . venv/bin/activate + tox -e coverage,flake8 + - run: + name: After Tests + command: | + . venv/bin/activate + ls -ltra tests/reports/ + codeclimate-test-reporter --token $CC_TEST_REPORTER_ID --file .coverage + - store_artifacts: + path: dist + destination: dist \ No newline at end of file diff --git a/README.rst b/README.rst index 9839b8b..90954f7 100644 --- a/README.rst +++ b/README.rst @@ -99,5 +99,7 @@ Getting Started :target: https://travis-ci.org/netzulo/testlink-tests .. |master_ci_appveyor| image:: https://ci.appveyor.com/api/projects/status/8kqf9o9mjgvte40j?svg=true :target: https://ci.appveyor.com/project/netzulo/testlink-tests -.. |master_ci_circleci| image:: http://demo.testlink.org -.. |master_ci_codeclimate| image:: http://demo.testlink.org +.. |master_ci_circleci| image:: https://circleci.com/gh/netzulo/testlink-tests.svg?style=svg + :target: https://circleci.com/gh/netzulo/testlink-tests) +.. |master_ci_codeclimate| image:: https://api.codeclimate.com/v1/badges/84904556cd07ad4fcf00/maintainability + :target: https://codeclimate.com/github/netzulo/testlink-tests/maintainability