4343 - |
4444 outside_reference_1
4545 outside_reference_2
46+ index-rst-source :
47+ - ' '
48+ project :
49+ - ' '
50+ copyright :
51+ - ' '
52+ title :
53+ - ' '
54+ html-short-title :
55+ - ' '
56+ extra-conf :
57+ - ' '
58+ extra-html-context :
59+ - ' '
60+ extra-html-theme-options :
61+ - ' '
4662 intersphinx-links : ['']
4763 squash-hierarchy :
4864 - false
@@ -61,12 +77,29 @@ jobs:
6177 amazon_aws:https://ansible-collections.github.io/amazon.aws/branch/main/
6278 ansible_devel:https://docs.ansible.com/ansible-core/devel/
6379 squash-hierarchy : false
80+ index-rst-source : README.md
81+ title : Some long title
6482 - skip-init : false
6583 collections : foo.bar
6684 dest : ' '
6785 lenient : false
6886 fail-on-error : true
6987 squash-hierarchy : true
88+ project : Foo
89+ copyright : Bar
90+ title : Long title
91+ html-short-title : Short title
92+ extra-conf : |
93+ foo=bar
94+ baz=bam
95+ long=This is "something long" 'with different quotes'
96+ extra-html-context : |
97+ foo=bam
98+ baz=bar
99+ long=Another "long" 'quotes' sentence
100+ extra-html-theme-options : |
101+ foo=baz
102+ long=Yet "another" long 'quotes' text
70103
71104 steps :
72105 - name : Checkout
@@ -96,6 +129,14 @@ jobs:
96129 provide-link-targets : ${{ matrix.provide-link-targets }}
97130 intersphinx-links : ${{ matrix.intersphinx-links }}
98131 squash-hierarchy : ${{ matrix.squash-hierarchy }}
132+ index-rst-source : ${{ matrix.index-rst-source }}
133+ project : ${{ matrix.project }}
134+ copyright : ${{ matrix.copyright }}
135+ title : ${{ matrix.title }}
136+ html-short-title : ${{ matrix.html-short-title }}
137+ extra-conf : ${{ matrix.extra-conf }}
138+ extra-html-context : ${{ matrix.extra-html-context }}
139+ extra-html-theme-options : ${{ matrix.extra-html-theme-options }}
99140
100141 - name : assert
101142 env :
@@ -104,6 +145,8 @@ jobs:
104145 run : |
105146 set -x
106147
148+ ORIGINAL_DIR=$(pwd)
149+
107150 # check that the build script exists
108151 [ -f "$output_build_script" ] || exit 1
109152
@@ -112,11 +155,30 @@ jobs:
112155 mkdir -p "$output_build_html"
113156 cd "$output_build_html/../.."
114157
158+ ${{ matrix.skip-init }} || (
159+ echo "::group::Show requirements.txt contents"
160+ cat requirements.txt
161+ echo
162+ echo "::endgroup::"
163+
164+ echo "::group::Show build.sh contents"
165+ cat build.sh
166+ echo
167+ echo "::endgroup::"
168+
169+ echo "::group::Show conf.py contents"
170+ cat conf.py
171+ echo
172+ echo "::endgroup::"
173+ )
174+
115175 # by now, all requirements should have been installed, let's pip freeze
116176 pip freeze > "${{ runner.temp }}/pre-freeze.txt"
117177
118178 # now we'll try to do a pip install again with the requirements file
179+ echo "::group::Install requirements again"
119180 pip install -r "requirements.txt" --disable-pip-version-check
181+ echo "::endgroup::"
120182
121183 # and pip freeze again to compare
122184 pip freeze > "${{ runner.temp }}/post-freeze.txt"
@@ -153,6 +215,23 @@ jobs:
153215 # Check that the squash hierarchy flag was added
154216 ${{ matrix.squash-hierarchy }} && (grep -q -- ' --squash-hierarchy ' build.sh || exit 1)
155217
156- # check if provide-link-targets was not used when being empty
218+ # Check if provide-link-targets was not used when being empty
157219 # short circuit if skip-init is 'true' or matrix.provide-link-targets is not empty
158220 ${{ matrix.skip-init }} || ${{ matrix.provide-link-targets != '' }} || ! test -e rst/_targets.rst || exit 1
221+
222+ # Check whether index-rst-source worked
223+ ${{ matrix.index-rst-source && 'true' || 'false' }} && (diff "${ORIGINAL_DIR}/${{ matrix.index-rst-source }}" rst/index.rst || exit 1)
224+
225+ # Check whether config options worked
226+ ${{ matrix.project && 'true' || 'false' }} && (grep "project = '${{ matrix.project }}'" conf.py || exit 1)
227+ ${{ matrix.copyright && 'true' || 'false' }} && (grep "copyright = '${{ matrix.copyright }}'" conf.py || exit 1)
228+ ${{ matrix.title && 'true' || 'false' }} && (grep "title = '${{ matrix.title }}'" conf.py || exit 1)
229+ ${{ matrix.title && !matrix.html-short-title && 'true' || 'false' }} && (grep "html_short_title = '${{ matrix.title }}'" conf.py || exit 1)
230+ ${{ matrix.html-short-title && 'true' || 'false' }} && (grep "html_short_title = '${{ matrix.html-short-title }}'" conf.py || exit 1)
231+
232+ # TODO Check extra-conf
233+ # TODO Check extra-html-context
234+ # TODO Check extra-html-theme-options
235+
236+ # This must be the last line
237+ exit 0
0 commit comments