-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
48 lines (41 loc) · 1.12 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Config file for automatic testing at travis-ci.com
##
## NB This requires the following variables to be defined against
## The project in travis-ci:-
## GH_TOKEN - Github PAT allowing documentation push to github pages
## PYPI_PASSWORD - PYPI Token (not password) allowing push to pypi
language: python
python:
- "3.8"
install:
- pip install poetry
- poetry install
script:
- poetry run pytest
- poetry run mkdocs build
stages:
- test
- lint
- name: deploy
if: tag IS present
jobs:
fast_finish: true
before_deploy:
- pip install --upgrade pip
- pip install poetry
- poetry config pypi-token.pypi $PYPI_PASSWORD
deploy:
- provider: script
script: poetry publish --build
on:
python: 3.8
branch: master
tags: true
# push the documentation out
after_deploy:
- git config user.name "Travis Docs Builder"
- git config user.email "[email protected]"
- git remote add gh-token "https://${GH_TOKEN}@github.com/nigelm/moin2gitwiki.git";
- git fetch gh-token && git fetch gh-token gh-pages:gh-pages;
- poetry run mkdocs gh-deploy -v --clean --remote-name gh-token;
# end