diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..5392bb3 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,98 @@ +version: 2.1 + +aliases: + - &environ + run: + name: setup virtual environment + # The below ensures the venv is activated for every subsequent step + command: | + virtualenv venv + echo "source /home/circleci/project/venv/bin/activate" >> $BASH_ENV + + - &install + run: + name: install dependencies + command: | + pip install -U pip setuptools wheel tox tox-factor coveralls + + - &test-steps + steps: + - checkout + - *environ + - *install + - run: tox + - run: coverage combine + - run: coverage report + - run: coveralls + +jobs: + lint: + steps: + - checkout + - *environ + - *install + - run: tox -e lint + docker: + - image: circleci/python:3.7 + + test-py37: + <<: *test-steps + docker: + - image: circleci/python:3.7 + environment: + TOXFACTOR: py37 + + test-py36: + <<: *test-steps + docker: + - image: circleci/python:3.6 + environment: + TOXFACTOR: py36 + + test-py35: + <<: *test-steps + docker: + - image: circleci/python:3.5 + environment: + TOXFACTOR: py35 + + test-py27: + <<: *test-steps + docker: + - image: circleci/python:2.7 + environment: + TOXFACTOR: py27 + + +workflows: + version: 2 + commit: &test-workflow + jobs: + - lint + + - test-py37: + requires: + - lint + + - test-py36: + requires: + - lint + + - test-py35: + requires: + - lint + + - test-py27: + requires: + - lint + + weekly: + <<: *test-workflow + triggers: + - schedule: + # 8/9 AM PST/PDT every Monday + cron: "0 16 * * 1" + filters: + branches: + only: + - master diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index b059c1e..0000000 --- a/.travis.yml +++ /dev/null @@ -1,26 +0,0 @@ -language: python -python: - - "2.7" - - "3.5" - - "3.6" -env: - - DJANGO=1.11.* DRF=3.7.* - - DJANGO=1.11.* DRF=3.8.* - - DJANGO=2.0.* DRF=3.7.* - - DJANGO=2.0.* DRF=3.8.* -install: - - pip install -q Django==$DJANGO djangorestframework==$DRF - - pip install coveralls - - pip install -r rest_auth/tests/requirements.pip -script: - - coverage run --source=rest_auth setup.py test -after_success: - - coveralls -before_script: - - flake8 . --config=flake8 -matrix: - exclude: - - python: "2.7" - env: DJANGO=2.0.* DRF=3.7.* - - python: "2.7" - env: DJANGO=2.0.* DRF=3.8.*