-
Notifications
You must be signed in to change notification settings - Fork 12
/
config.yml
82 lines (80 loc) · 2.07 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
version: 2
jobs:
build:
docker:
- image: cimg/python:3.8
steps:
- setup_remote_docker
- checkout
- run:
name: Install buildstock
command: |
pip install .[dev] --progress-bar off
- run:
name: Run PyTest
command: |
pytest -v
- run:
name: Run coverage tests
when: always
command: |
set +e
coverage run --source=buildstockbatch -m pytest > /dev/null 2>&1
coverage report -m
coverage html -d /tmp/coverage_report
- run:
name: Run style checks
when: always
command: |
flake8 buildstockbatch
- store_artifacts:
path: /tmp/coverage_report
destination: coverage-report
- run:
name: Build documentation
when: always
command: |
cd docs
make html
mkdir /tmp/docs
cp -r _build/html/* /tmp/docs
- persist_to_workspace:
root: /tmp
paths:
- docs
- store_artifacts:
path: /tmp/docs
destination: docs
docs-deploy:
docker:
- image: node
steps:
- checkout
- attach_workspace:
at: /tmp
- run:
name: Disable jekyll builds
command: touch /tmp/docs/.nojekyll
- run:
name: Install and configure dependencies
command: |
npm install -g --silent gh-pages@3.0.0
git config user.email "noel.merket@nrel.gov"
git config user.name "Noel Merket CI Bot"
- add_ssh_keys:
fingerprints:
- "78:38:f3:2e:94:a6:20:46:3e:40:ee:31:3d:1e:95:09"
- run:
name: Deploy docs to gh-pages branch
command: gh-pages --dotfiles --message "[skip ci] update api docs" --dist /tmp/docs
workflows:
version: 2
build-test-deploy:
jobs:
- build
- docs-deploy:
requires:
- build
filters:
branches:
only: master