-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
48 lines (43 loc) · 1.21 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
language: python
python:
- "3.8"
addons:
apt:
packages:
- unixodbc
- unixodbc-dev
before_script:
- pip install poetry
- poetry install
script:
- skip
stages:
- lint
- test
- deploy
jobs:
include:
- stage: lint
name: Run isort and pylinting
script:
- poetry run isort -c blackboxopt/
- poetry run pylint blackboxopt/ --max-line-length=120 --ignore=tests --fail-under=9
- stage: test
name: Run pytests
script:
- poetry run pytest -W ignore tests/ --cov blackboxopt/ --cov-report xml --cov-fail-under=0
after_success:
- poetry run bash <(curl -s https://codecov.io/bash)
- stage: deploy
name: Deploy to GitHub Pages
if: (NOT type IN (pull_request)) AND (branch = main) # only deploy if merging on master
script:
- poetry run sphinx-apidoc -e -f -o docs/ blackboxopt/ tests/
- cd docs && poetry run make html && cd ..
deploy:
on:
branch: main
provider: pages # deploy on github pages
skip_cleanup: true
github_token: "$token" # defined via the Travis interface
local_dir: docs/_build/html/