Skip to content

Commit 88e49fb

Browse files
author
David Montague
committed
Update workflow
1 parent c2d2c69 commit 88e49fb

3 files changed

Lines changed: 25 additions & 16 deletions

File tree

.github/workflows/build.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ jobs:
1111
build:
1212
runs-on: ubuntu-latest
1313
strategy:
14-
max-parallel: 2
14+
max-parallel: 3
1515
matrix:
16-
python-version: [3.6, 3.7]
16+
python-version: [3.6, 3.7, 3.8]
1717

1818
steps:
1919
- uses: actions/checkout@v1
@@ -47,6 +47,7 @@ jobs:
4747
run: |
4848
codecov --token=${{ secrets.CODECOV_TOKEN }}
4949
- name: Check docs build
50+
# only run this for the python version used by netlify:
51+
if: matrix.python-version == "3.7"
5052
run: |
51-
make docs-build
52-
git diff-index --quiet HEAD --
53+
make docs-build-ci

.github/workflows/pull-request.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ jobs:
99
build:
1010
runs-on: ubuntu-latest
1111
strategy:
12-
max-parallel: 2
12+
max-parallel: 3
1313
matrix:
14-
python-version: [3.7]
14+
python-version: [3.6, 3.7, 3.8]
1515

1616
steps:
1717
- uses: actions/checkout@v1
@@ -45,6 +45,7 @@ jobs:
4545
run: |
4646
codecov --token=${{ secrets.CODECOV_TOKEN }}
4747
- name: Check docs build
48+
# only run this for the python version used by netlify:
49+
if: matrix.python-version == "3.7"
4850
run: |
49-
make docs-build
50-
git diff-index --quiet HEAD --
51+
make docs-build-ci

Makefile

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,11 @@ ci: check-format lint mypy test
5353

5454
.PHONY: check-format ## Check the source code format without changes
5555
check-format:
56-
$(isort) --check-only
57-
@echo $(autoflake) --check
58-
@( set -o pipefail; $(autoflake) --check | (grep -v "No issues detected!" || true) )
56+
$(isort) $(docs_src) --check-only
57+
@echo $(autoflake) $(docs_src) --check
58+
@( set -o pipefail; $(autoflake) $(docs_src) --check | (grep -v "No issues detected!" || true) )
5959
$(black) --check
60+
black -l 82 $(docs_src) --check
6061

6162
.PHONY: clean ## Remove temporary and cache files/directories
6263
clean:
@@ -92,14 +93,20 @@ version: poetryversion
9293
.PHONY: docs-build ## Generate the docs and update README.md
9394
docs-build:
9495
python -m mkdocs build
95-
cp docs/index.md README.md
96-
cp docs/contributing.md CONTRIBUTING.md
96+
cp ./docs/index.md ./README.md
97+
cp ./docs/contributing.md ./CONTRIBUTING.md
98+
99+
.PHONY: docs-build-ci ## Generate the docs and check README.md is up-to-date
100+
docs-build-ci:
101+
python -m mkdocs build
102+
cmp README.md docs/index.md
103+
cmp CONTRIBUTING.md docs/contributing.md
97104

98105
.PHONY: docs-format ## Format the python code that is part of the docs
99106
docs-format:
100-
isort -rc docs/src
101-
autoflake -r --remove-all-unused-imports --ignore-init-module-imports docs/src -i
102-
black -l 82 docs/src
107+
isort -rc $(docs_src)
108+
autoflake -r --remove-all-unused-imports --ignore-init-module-imports $(docs_src) -i
109+
black -l 82 $(docs_src)
103110

104111
.PHONY: docs-live ## Serve the docs with live reload as you make changes
105112
docs-live:

0 commit comments

Comments
 (0)