mirror of
https://github.com/ChristianLight/tutor.git
synced 2024-05-28 20:00:49 +00:00
Better CI
This commit is contained in:
parent
1781e6e3c3
commit
5974cb5f50
22
.travis.yml
22
.travis.yml
|
@ -28,18 +28,11 @@ matrix:
|
||||||
language: generic
|
language: generic
|
||||||
env:
|
env:
|
||||||
BUILD_BINARY: "true"
|
BUILD_BINARY: "true"
|
||||||
script:
|
|
||||||
- python3 --version
|
|
||||||
- pip3 --version
|
|
||||||
- pip3 install -U setuptools
|
|
||||||
- pip3 install -r requirements/dev.txt
|
|
||||||
- make bundle
|
|
||||||
- ./dist/tutor config noninteractive
|
|
||||||
- ./dist/tutor images env
|
|
||||||
- ./dist/tutor local env
|
|
||||||
|
|
||||||
before_deploy:
|
script:
|
||||||
- cp ./dist/tutor ./dist/tutor-$TRAVIS_OS_NAME
|
- make ci-info
|
||||||
|
- make ci-bundle
|
||||||
|
- make ci-test
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
# Push tutor binary to github releases
|
# Push tutor binary to github releases
|
||||||
|
@ -54,10 +47,7 @@ deploy:
|
||||||
|
|
||||||
# Push docker images to docker hub
|
# Push docker images to docker hub
|
||||||
- provider: script
|
- provider: script
|
||||||
script: ./dist/tutor images build all && \
|
script: make ci-images
|
||||||
./dist/tutor local databases && \
|
|
||||||
docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD" && \
|
|
||||||
./dist/tutor images push all
|
|
||||||
skip_cleanup: true
|
skip_cleanup: true
|
||||||
on:
|
on:
|
||||||
tags: true
|
tags: true
|
||||||
|
@ -65,7 +55,7 @@ deploy:
|
||||||
|
|
||||||
# Push to pypi
|
# Push to pypi
|
||||||
- provider: script
|
- provider: script
|
||||||
script: pip install twine && python setup.py sdist && twine upload dist/*.tar.gz
|
script: make ci-pypi
|
||||||
skip_cleanup: true
|
skip_cleanup: true
|
||||||
on:
|
on:
|
||||||
tags: true
|
tags: true
|
||||||
|
|
|
@ -1,5 +1,11 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## Latest
|
||||||
|
|
||||||
|
- [Improvement] Better handling of continuous integration
|
||||||
|
- [Bugfix] fix `tutor --version` (#156)
|
||||||
|
- [Improvement] Absolute settings imports -- 📯 thanks @tonytan4ever!
|
||||||
|
|
||||||
## 3.0.0 (2019-06-09)
|
## 3.0.0 (2019-06-09)
|
||||||
|
|
||||||
- [Improvement] Complete rewrite of Tutor: switch from a make-based project to a single binary which runs all commands.
|
- [Improvement] Complete rewrite of Tutor: switch from a make-based project to a single binary which runs all commands.
|
||||||
|
|
27
Makefile
27
Makefile
|
@ -13,6 +13,33 @@ travis: bundle ## Run tests on travis-ci
|
||||||
./dist/tutor images build all
|
./dist/tutor images build all
|
||||||
./dist/tutor local databases
|
./dist/tutor local databases
|
||||||
|
|
||||||
|
ci-info: ## Print info about environment
|
||||||
|
python3 --version
|
||||||
|
pip3 --version
|
||||||
|
|
||||||
|
ci-bundle: ## Create bundle
|
||||||
|
pip3 install -U setuptools
|
||||||
|
pip3 install -r requirements/dev.txt
|
||||||
|
$(MAKE) bundle
|
||||||
|
cp ./dist/tutor ./dist/tutor-$$TRAVIS_OS_NAME
|
||||||
|
|
||||||
|
ci-test: ## Run basic tests
|
||||||
|
./dist/tutor config noninteractive
|
||||||
|
./dist/tutor images env
|
||||||
|
./dist/tutor local env
|
||||||
|
|
||||||
|
ci-images: ## Build and push docker images to hub.docker.com
|
||||||
|
python setup.py develop
|
||||||
|
tutor images build all
|
||||||
|
tutor local databases
|
||||||
|
docker login -u "$$DOCKER_USERNAME" -p "$$DOCKER_PASSWORD"
|
||||||
|
tutor images push all
|
||||||
|
|
||||||
|
ci-pypi: ## Push release to pypi
|
||||||
|
pip install twine
|
||||||
|
python setup.py sdist
|
||||||
|
twine upload dist/*.tar.gz
|
||||||
|
|
||||||
ESCAPE =
|
ESCAPE =
|
||||||
help: ## Print this help
|
help: ## Print this help
|
||||||
@grep -E '^([a-zA-Z_-]+:.*?## .*|######* .+)$$' Makefile \
|
@grep -E '^([a-zA-Z_-]+:.*?## .*|######* .+)$$' Makefile \
|
||||||
|
|
Loading…
Reference in New Issue
Block a user