-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added fix as per #3 * Configured circleci for building and publishing * Added v0.1.5
- Loading branch information
1 parent
23213e5
commit 5403bc8
Showing
5 changed files
with
98 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
# Defined anchors for re-usable components | ||
references: | ||
restore_cache: &restore_cache | ||
restore_cache: | ||
key: deps1-{{ .Branch }}-{{ checksum "requirements.txt" }} | ||
install_dependencies: &install_dependencies | ||
run: | ||
name: Install Python deps in a venv | ||
command: | | ||
python3 -m venv venv | ||
. venv/bin/activate | ||
python3 -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
pip install setuptools wheel twine | ||
save_cache: &save_cache | ||
save_cache: | ||
key: deps1-{{ .Branch }}-{{ checksum "requirements.txt" }} | ||
paths: | ||
- "venv" | ||
run_unittests: &run_unittests | ||
run: | ||
name: Run unittests | ||
command: | | ||
. venv/bin/activate | ||
python3 -m unittest discover | ||
init_pypirc: &init_pypirc | ||
run: | ||
name: init .pypirc | ||
command: | | ||
echo -e "[pypi]" >> ~/.pypirc | ||
echo -e "username = __token__" >> ~/.pypirc | ||
echo -e "password = $PYPI_PASSWORD" >> ~/.pypirc | ||
build_publish: &build_publish | ||
run: | ||
name: Build and publish | ||
command: | | ||
. venv/bin/activate | ||
python3 setup.py sdist bdist_wheel | ||
python3 -m twine upload dist/* | ||
# Actual jobs | ||
version: 2 | ||
jobs: | ||
test_all: | ||
working_directory: ~/pycorr | ||
docker: | ||
- image: circleci/python:3.7.1-stretch | ||
steps: | ||
- checkout | ||
- <<: *restore_cache | ||
- <<: *install_dependencies | ||
- <<: *save_cache | ||
- <<: *run_unittests | ||
|
||
pypi_publish: | ||
working_directory: ~/pycorr | ||
docker: | ||
- image: circleci/python:3.7.1-stretch | ||
steps: | ||
- checkout | ||
- <<: *restore_cache | ||
- <<: *install_dependencies | ||
- <<: *save_cache | ||
- <<: *run_unittests | ||
- <<: *init_pypirc | ||
- <<: *build_publish | ||
|
||
# defined workflows | ||
workflows: | ||
version: 2 | ||
test_dev: | ||
jobs: | ||
- test_all: | ||
filters: | ||
branches: | ||
only: | ||
- develop | ||
publish_master: | ||
jobs: | ||
- pypi_publish: | ||
filters: | ||
branches: | ||
only: | ||
- master | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Empty file.
File renamed without changes.