Skip to content

Commit 6417def

Browse files
authored
Merge pull request #1175 from readthedocs/agj/add-build-test
Add a CI test for unbuilt assets
2 parents 2ab605a + 51d41e6 commit 6417def

File tree

3 files changed

+39
-8
lines changed

3 files changed

+39
-8
lines changed

.circleci/config.yml

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,28 @@ commands:
1313
- checkout
1414
- run: pip install --user tox
1515
- run: tox -e "<<parameters.version>>-sphinx{<<parameters.sphinx-version>>}"
16+
run-build:
17+
description: "Ensure built assets are up to date"
18+
steps:
19+
- checkout
20+
- run: npm ci
21+
- run: npm run build
22+
- run:
23+
name: Ensure built assets are up to date
24+
command: |
25+
if [[ `git status sphinx_rtd_theme/ --porcelain` ]]
26+
then
27+
echo "ERROR: assets are out of date. Make sure to run 'npm run build' on your branch."
28+
git status sphinx_rtd_theme/ --porcelain
29+
exit 1
30+
fi
1631
1732
jobs:
33+
build:
34+
docker:
35+
- image: 'cimg/python:3.9-node'
36+
steps:
37+
- run-build: {}
1838
py27:
1939
docker:
2040
- image: 'cimg/python:2.7'
@@ -50,8 +70,19 @@ workflows:
5070
version: 2
5171
tests:
5272
jobs:
53-
- py39
54-
- py38
55-
- py37
56-
- py36
57-
- py27
73+
- build
74+
- py39:
75+
requires:
76+
- build
77+
- py38:
78+
requires:
79+
- build
80+
- py37:
81+
requires:
82+
- build
83+
- py36:
84+
requires:
85+
- build
86+
- py27:
87+
requires:
88+
- build

sphinx_rtd_theme/static/css/theme.css

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sphinx_rtd_theme/static/js/theme.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)