Skip to content

Commit 8a74666

Browse files
committed
use github action for spellcheck
1 parent a501495 commit 8a74666

File tree

8 files changed

+67
-22
lines changed

8 files changed

+67
-22
lines changed

.github/workflows/spellcheck.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Spellcheck
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Set up Python
17+
uses: actions/setup-python@v1
18+
with:
19+
python-version: 3.7
20+
- name: Install dependencies
21+
run: |
22+
python -m pip install --upgrade setuptools
23+
python -m pip install -r doc/requirements.txt
24+
- name: Run spell check
25+
run: |
26+
make -C doc/ spelling
27+
if [[ -s "doc/_build/spelling/output.txt" ]]; then echo "\nSpelling errors found\n" && cat "doc/_build/spelling/output.txt"; fi
28+
- name: Spellcheck
29+
run: |
30+
if [[ -s "doc/_build/spelling/output.txt" ]]; then cat "doc/_build/spelling/output.txt"; fi
31+
if [[ -s "doc/_build/spelling/output.txt" ]]; then false; fi

.readthedocs.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
version: 2
2+
3+
sphinx:
4+
configuration: conf.py
5+
6+
# additional formats
7+
formats:
8+
- pdf
9+
10+
python:
11+
version: "3.7"
12+
install:
13+
- requirements: doc/requirements.txt

.travis.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ matrix:
2323
- php: 7.3
2424
- php: 7.4
2525
env: COVERAGE=true PHPUNIT_FLAGS="-v --coverage-text" VARNISH_MODULES_VERSION=0.12.1
26-
#TODO re-add DOCCHECK=true - see https://github.com/FriendsOfSymfony/FOSHttpCache/pull/450
2726

2827
# PHP 8.0 (Travis does not yet support using the stable 8.0.0)
2928
- php: nightly
@@ -76,17 +75,13 @@ before_script:
7675
cat /etc/apt/sources.list
7776
sudo apt-get update -qq
7877
sudo apt-get install -qq varnish
79-
- if [ "$DOCCHECK" = true ]; then sudo apt-get install -qq python-sphinx enchant; fi
80-
- if [ "$DOCCHECK" = true ]; then sudo pip install -r doc/requirements.txt; fi
8178
- if [ "$VARNISH_MODULES_VERSION" != "" ]; then sh ./tests/install-varnish-modules.sh; fi
8279
# Install NGINX
8380
- sh ./tests/install-nginx.sh
8481

8582
script:
8683
- composer validate --strict --no-check-lock
8784
- vendor/bin/simple-phpunit $PHPUNIT_FLAGS
88-
- if [[ "$DOCCHECK" = true ]]; then make -C doc SPHINXOPTS='-nW' html; fi
89-
- if [[ "$DOCCHECK" = true ]]; then make -C doc spelling; fi
9085

9186
after_script:
9287
- if [[ $COVERAGE = true ]]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi

doc/_static/tabs.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ div.configuration-block ul.simple li.selected a {
2525
color: white;
2626
}
2727

28-
div.highlight-varnish3, div.highlight-varnish {
28+
div.highlight-varnish3, div.highlight-varnish4 {
2929
border: none !important;
3030
}
3131

doc/conf.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
lexers['php'] = PhpLexer(startinline=True, linenos=1)
1111
lexers['varnish3'] = CLexer()
12-
lexers['varnish'] = CLexer()
12+
lexers['varnish4'] = CLexer()
1313

1414
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
1515
if not on_rtd: # only import and set the theme if we're building docs locally
@@ -132,10 +132,14 @@
132132
# so a file named "default.css" will overwrite the builtin "default.css".
133133
html_static_path = ['_static']
134134

135-
def setup(app):
136-
app.add_javascript('tabs.js')
137-
app.add_stylesheet('tabs.css')
138-
app.add_stylesheet('fos.css')
135+
html_js_files = [
136+
'tabs.js',
137+
]
138+
139+
html_css_files = [
140+
'tabs.css',
141+
'fos.css',
142+
]
139143

140144
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
141145
# using the given strftime format.
@@ -265,5 +269,5 @@ def setup(app):
265269

266270
config_block = {
267271
'varnish3': 'Varnish 3',
268-
'varnish': 'Varnish 4 & 5'
272+
'varnish4': 'Varnish 4 & 5'
269273
}

doc/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
sphinx==1.8.5
12
git+https://github.com/fabpot/sphinx-php.git
23
sphinx-rtd-theme
34
sphinxcontrib-spelling

doc/spelling_word_list.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ backend
33
cacheable
44
config
55
css
6+
Fastly
67
hostname
78
hostnames
89
http

doc/varnish-configuration.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ which IPs are allowed to issue invalidation requests. To use the provided
1616
configuration fragments, this ACL has to be named ``invalidators``. The most
1717
simple ACL, valid for all Varnish versions from 3 onwards, looks as follows:
1818

19-
.. code-block:: varnish
19+
.. code-block:: varnish4
2020
2121
# /etc/varnish/your_varnish.vcl
2222
@@ -59,7 +59,7 @@ To enable this feature, add the following to ``your_varnish.vcl``:
5959

6060
.. configuration-block::
6161

62-
.. code-block:: varnish
62+
.. code-block:: varnish4
6363
6464
include "path-to-config/varnish/fos_purge.vcl";
6565
@@ -100,7 +100,7 @@ To enable this feature, add the following to ``your_varnish.vcl``:
100100

101101
.. configuration-block::
102102

103-
.. code-block:: varnish
103+
.. code-block:: varnish4
104104
105105
include "path-to-config/varnish/fos_refresh.vcl";
106106
@@ -129,7 +129,7 @@ To enable this feature, add the following to ``your_varnish.vcl``:
129129

130130
.. configuration-block::
131131

132-
.. code-block:: varnish
132+
.. code-block:: varnish4
133133
134134
include "path-to-config/varnish/fos_ban.vcl";
135135
@@ -211,7 +211,7 @@ and include ``resources/config/varnish/fos_tags_xkey.vcl`` in your VCL:
211211

212212
.. configuration-block::
213213

214-
.. code-block:: varnish
214+
.. code-block:: varnish4
215215
216216
include "path-to-config/varnish/fos_tags_xkey.vcl";
217217
@@ -242,7 +242,7 @@ look like this:
242242
.. configuration-block::
243243

244244
.. literalinclude:: ../resources/config/varnish/fos_ban.vcl
245-
:language: varnish
245+
:language: varnish4
246246
:emphasize-lines: 17-23,50-51
247247
:linenos:
248248

@@ -288,7 +288,7 @@ To enable this feature, add the following to ``your_varnish.vcl``:
288288

289289
.. configuration-block::
290290

291-
.. code-block:: varnish
291+
.. code-block:: varnish4
292292
293293
include "path-to-config/varnish/fos_user_context.vcl";
294294
include "path-to-config/varnish/fos_user_context_url.vcl";
@@ -365,7 +365,7 @@ To make the hash request cacheable, you must extract a stable user session id
365365
*before* calling ``fos_user_context_recv``. You can do this as
366366
`explained in the Varnish documentation`_:
367367

368-
.. code-block:: varnish
368+
.. code-block:: varnish4
369369
:linenos:
370370
371371
sub vcl_recv {
@@ -397,7 +397,7 @@ Add the following to ``your_varnish.vcl``:
397397

398398
.. configuration-block::
399399

400-
.. code-block:: varnish
400+
.. code-block:: varnish4
401401
402402
include "path-to-config/varnish/fos_custom_ttl.vcl";
403403
@@ -438,7 +438,7 @@ To enable this feature, add the following to ``your_varnish.vcl``:
438438

439439
.. configuration-block::
440440

441-
.. code-block:: varnish
441+
.. code-block:: varnish4
442442
443443
include "path-to-config/varnish/fos_debug.vcl";
444444

0 commit comments

Comments
 (0)