From 8beae984f421b7a29f1868d23a878a8fda2810a5 Mon Sep 17 00:00:00 2001 From: maomj2008 <38520701+maomj2008@users.noreply.github.com> Date: Thu, 6 May 2021 22:21:03 +0800 Subject: [PATCH 1/5] Add .circleci/config.yml --- .circleci/config.yml | 70 +++++++++----------------------------------- 1 file changed, 14 insertions(+), 56 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d601a65..12a4918 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,63 +1,21 @@ -version: 2 +version: 2.1 + +orbs: + python: circleci/python@0.2.1 + jobs: - test: - docker: - - image: circleci/python:3.6.4 - - image: trufflesuite/ganache-cli:v6.6.0 - command: -d -k=petersburg -i 1001 - working_directory: ~/build + build-and-test: + executor: python/default steps: - checkout + - python/load-cache + - python/install-deps + - python/save-cache - run: - name: install dependencies - command: sudo pip install -r requirements.txt - - run: - name: test - command: tox - lint: - docker: - - image: circleci/python:3.6.4 - working_directory: ~/build - steps: - - checkout - - run: - name: install dependencies - command: sudo pip install -r requirements-lint.txt - - run: - name: lint - command: flake8 - publish: - docker: - - image: circleci/python:3.6.4 - working_directory: ~/build - steps: - - checkout - - run: - name: install dependencies - command: sudo pip install -r requirements-publish.txt - - run: - name: init .pypirc - command: | - echo -e "[pypi]" >> ~/.pypirc - echo -e "username = __token__" >> ~/.pypirc - echo -e "password = $PYPI_TOKEN" >> ~/.pypirc - - run: - name: create packages - command: python3 setup.py sdist bdist_wheel - - run: - name: upload to pypi - command: python3 -m twine upload dist/* --skip-existing + command: ./manage.py test + name: Test workflows: - version: 2 - build_and_test: + main: jobs: - - lint - - test - - publish: - requires: - - lint - - test - filters: - branches: - only: master + - build-and-test From 15d9d711240cd6bff98771c329116bd9ac30d1ee Mon Sep 17 00:00:00 2001 From: maomj2008 <38520701+maomj2008@users.noreply.github.com> Date: Thu, 6 May 2021 22:29:17 +0800 Subject: [PATCH 2/5] Add .circleci/config.yml From dac96cd2db41074da276701b951c95f4721654aa Mon Sep 17 00:00:00 2001 From: maomj2008 <38520701+maomj2008@users.noreply.github.com> Date: Thu, 6 May 2021 22:31:24 +0800 Subject: [PATCH 3/5] Add .circleci/config.yml --- .circleci/config.yml | 70 +++++++++++++++++++++++++++++++++++--------- 1 file changed, 56 insertions(+), 14 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 12a4918..d601a65 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,21 +1,63 @@ -version: 2.1 - -orbs: - python: circleci/python@0.2.1 - +version: 2 jobs: - build-and-test: - executor: python/default + test: + docker: + - image: circleci/python:3.6.4 + - image: trufflesuite/ganache-cli:v6.6.0 + command: -d -k=petersburg -i 1001 + working_directory: ~/build steps: - checkout - - python/load-cache - - python/install-deps - - python/save-cache - run: - command: ./manage.py test - name: Test + name: install dependencies + command: sudo pip install -r requirements.txt + - run: + name: test + command: tox + lint: + docker: + - image: circleci/python:3.6.4 + working_directory: ~/build + steps: + - checkout + - run: + name: install dependencies + command: sudo pip install -r requirements-lint.txt + - run: + name: lint + command: flake8 + publish: + docker: + - image: circleci/python:3.6.4 + working_directory: ~/build + steps: + - checkout + - run: + name: install dependencies + command: sudo pip install -r requirements-publish.txt + - run: + name: init .pypirc + command: | + echo -e "[pypi]" >> ~/.pypirc + echo -e "username = __token__" >> ~/.pypirc + echo -e "password = $PYPI_TOKEN" >> ~/.pypirc + - run: + name: create packages + command: python3 setup.py sdist bdist_wheel + - run: + name: upload to pypi + command: python3 -m twine upload dist/* --skip-existing workflows: - main: + version: 2 + build_and_test: jobs: - - build-and-test + - lint + - test + - publish: + requires: + - lint + - test + filters: + branches: + only: master From 243637aba2e20429e1e1180969a7db7e07497228 Mon Sep 17 00:00:00 2001 From: maomj2008 <38520701+maomj2008@users.noreply.github.com> Date: Thu, 6 May 2021 22:36:31 +0800 Subject: [PATCH 4/5] Add .circleci/config.yml From fa1ec4bc3b20769ef5176c642479589d26e1c1b4 Mon Sep 17 00:00:00 2001 From: maomj2008 <38520701+maomj2008@users.noreply.github.com> Date: Thu, 6 May 2021 22:45:11 +0800 Subject: [PATCH 5/5] Updated config.yml --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d601a65..24d020b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -53,11 +53,11 @@ workflows: build_and_test: jobs: - lint - - test +# - test - publish: requires: - lint - - test +# - test filters: branches: only: master