diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..b964949 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,41 @@ +version: 2.1 + +orbs: + python: circleci/python@1.5.0 + +jobs: + build-and-test: + docker: + - image: cimg/python:3.8 + steps: + - checkout + - run: + name: Install Dependencies + command: make dependencies + - run: + name: Lint + command: make lint + - run: + name: Test + command: make test + - run: + name: Publish Coverage + command: make coverage_publish + - run: + name: Report Coverage + command: make coverage_report + +workflows: + default: + jobs: + - build-and-test + nightly-build: + triggers: + - schedule: + cron: "5 10 * * 1-5" + filters: + branches: + only: master + jobs: + - build-and-test: + context: nightly diff --git a/.gitignore b/.gitignore index 79b9af6..db200c1 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ .pytest_cache /.coverage /htmlcov +*.pyc diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 36c3ba7..0000000 --- a/.travis.yml +++ /dev/null @@ -1,13 +0,0 @@ -language: python -python: - - '3.8' - -install: - - pip install pipenv - - make dependencies - -script: - - make lint - - make test - - make coverage_publish - - make coverage_report diff --git a/README.md b/README.md index 924e5d1..f348e0c 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # OpenMensa Parser STW Potsdam -[![Build Status](https://travis-ci.com/f4lco/om-parser-stw-potsdam-v2.svg?branch=master)](https://travis-ci.com/f4lco/om-parser-stw-potsdam-v2) +[![CircleCI](https://dl.circleci.com/status-badge/img/gh/f4lco/om-parser-stw-potsdam-v2/tree/master.svg?style=shield)](https://dl.circleci.com/status-badge/redirect/gh/f4lco/om-parser-stw-potsdam-v2/tree/master) [![Coverage Status](https://coveralls.io/repos/github/f4lco/om-parser-stw-potsdam-v2/badge.svg?branch=master)](https://coveralls.io/github/f4lco/om-parser-stw-potsdam-v2?branch=master) [![Read the Docs](https://readthedocs.org/projects/om-parser-stw-potsdam-v2/badge/?version=latest&style=flat)](https://om-parser-stw-potsdam-v2.readthedocs.io/en/latest/) diff --git a/docs/conf.py b/docs/conf.py index f37f0b3..98b033f 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -88,10 +88,10 @@ html_theme = 'alabaster' # html_theme_options = { 'github_banner': True, - 'github_button': False, + 'github_button': True, 'github_user': 'f4lco', 'github_repo': 'om-parser-stw-potsdam-v2', - 'travis_button': True, + 'travis_button': False, } diff --git a/tests/test_retrieval.py b/tests/test_retrieval.py index 7eade96..35f5b45 100644 --- a/tests/test_retrieval.py +++ b/tests/test_retrieval.py @@ -27,9 +27,7 @@ def canteen(request): def is_enabled(): - user_enabled = bool(os.getenv(ENV_ENABLED)) - travis_enabled = os.getenv('TRAVIS_EVENT_TYPE') == 'cron' - return user_enabled or travis_enabled + return bool(os.getenv(ENV_ENABLED)) requires_online_api = pytest.mark.skipif(