forked from sfu-db/dataprep
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.yml
107 lines (107 loc) · 3.02 KB
/
config.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
version: 2.0
jobs:
install_dependencies:
docker:
- image: circleci/python:3.7.2
steps:
- &step_add_path
run:
name: Add python user PATH into PATH
command: echo "export PATH=$PATH:$HOME/.local/bin" >> $BASH_ENV
- &step_install_pipenv
run:
name: Install python tools
command: pip install --user poetry==1.0.0b9
- &step_inproject_venv
run:
name: Set venv inproject
command: poetry config virtualenvs.in-project true
- checkout
- run:
name: Install dependencies
command: poetry install
no_output_timeout: 1200
- run:
name: Plot tool versions
command: poetry run mypy --version & poetry run pytype --version && poetry run pylint --version && poetry run pytest --version && poetry run black --version
- persist_to_workspace:
root: .
paths: .venv
check:
docker:
- image: circleci/python:3.7.2
steps:
- *step_add_path
- *step_install_pipenv
- *step_inproject_venv
- checkout
- attach_workspace:
at: .
- run:
name: Check if the code is formatted
command: poetry run black --check --quiet dataprep
- run:
name: Type check the project
command: poetry run pytype dataprep && poetry run mypy dataprep
- run:
name: Test the project
command: poetry run pytest dataprep
- run:
name: Style check the project
command: poetry run pylint dataprep
docs-build:
docker:
- image: circleci/python:3.7.2
steps:
- *step_add_path
- *step_install_pipenv
- *step_inproject_venv
- checkout
- attach_workspace:
at: .
- run:
name: Build docs
command: poetry run sphinx-build -M html docs/source docs/build
- persist_to_workspace:
root: .
paths: docs/build/html
docs-deploy:
docker:
- image: node:8.10.0
steps:
- add_ssh_keys:
fingerprints:
- "b7:f1:2a:54:c8:90:80:78:ba:30:d9:9b:b8:7d:03:10"
- checkout
- attach_workspace:
at: .
- run:
name: Install and configure dependencies
command: |
npm install -g --silent [email protected]
git config user.email "[email protected]"
git config user.name "ci"
- run:
name: Disable jekyll builds
command: touch docs/build/html/.nojekyll
- run:
name: Deploy docs to gh-pages branch
command: gh-pages --dotfiles --message "[skip ci] Updates" --dist docs/build/html
workflows:
version: 2
build_and_test:
jobs:
- install_dependencies
- check:
requires:
- install_dependencies
- docs-build:
requires:
- install_dependencies
- docs-deploy:
requires:
- check
- docs-build
filters:
branches:
only: master