Skip to content

Commit 477de81

Browse files
trallarddrammock
andauthored
DEV - Miscellaneous enhancements to CI (#1928)
This PR includes a couple of fixes to the CI workflows: - Moves the installation of Graphviz to our reusable setup action and uses third-party action - Ensures Graphviz is installed in the a11y tests - Adds a note about needing to install Graphviz to build our documentation - Re-adds CI permissions for the coverage action (that has led to fails in our scheduled CI https://github.com/pydata/pydata-sphinx-theme/actions/workflows/publish.yml) --------- Co-authored-by: Daniel McCloy <[email protected]>
1 parent 9427052 commit 477de81

File tree

3 files changed

+18
-15
lines changed

3 files changed

+18
-15
lines changed

.github/actions/set-dev-env/action.yml

+9-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ inputs:
99
pandoc:
1010
description: Whether this should install pandoc or not
1111
required: false
12-
default: "False"
12+
default: "false"
13+
graphviz:
14+
description: Whether this should install Graphviz or not
15+
required: false
16+
default: "false"
1317

1418
runs:
1519
using: composite
@@ -30,3 +34,7 @@ runs:
3034
with:
3135
pandoc-version: "latest"
3236
if: ${{ inputs.pandoc }} == true
37+
38+
- name: "Install Graphviz"
39+
uses: ts-graphviz/setup-graphviz@v2
40+
if: ${{ inputs.graphviz }} == true

.github/workflows/CI.yml

+6-13
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ jobs:
103103
uses: ./.github/actions/set-dev-env
104104
with:
105105
python-version: ${{ env.DEFAULT_PYTHON_VERSION }}
106+
pandoc: true
107+
graphviz: true
106108
- name: "Run accessibility tests with playwright 🎭"
107109
# build PST, build docs, then run a11y-tests
108110
run: python -Im tox run -e py312-docs,a11y-tests
@@ -129,19 +131,7 @@ jobs:
129131
with:
130132
python-version: ${{ matrix.python-version }}
131133
pandoc: true
132-
- name: "Install Graphviz on Windows 🗔"
133-
if: runner.os == 'Windows'
134-
run: choco install graphviz
135-
- name: "Install Graphviz on macOS "
136-
if: runner.os == 'macOS'
137-
run: |
138-
brew update
139-
brew install graphviz
140-
- name: "Install Graphviz on Linux 🐧"
141-
if: runner.os == 'Linux'
142-
run: |
143-
sudo apt-get update
144-
sudo apt-get install -y --no-install-recommends graphviz
134+
graphviz: true
145135
- name: "Build docs and check for warnings 📖"
146136
shell: bash
147137
run: |
@@ -191,6 +181,9 @@ jobs:
191181
name: "check coverage"
192182
needs: run-pytest
193183
runs-on: ubuntu-latest
184+
permissions:
185+
contents: write
186+
pull-requests: write
194187
steps:
195188
- name: "Checkout repository 🛎"
196189
uses: actions/checkout@v4

docs/community/setup.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,10 @@ The caveat to using `tox` is that this will not install the required hooks to ru
122122

123123
## Build the documentation
124124

125-
Now that you have `tox` installed and cloned the repository, you should be able to build the documentation locally.
125+
Now that you have `tox` installed and cloned the repository, you will need to install Graphviz to build the documentation.
126+
To install Graphviz, follow the instructions in the [Graphviz documentation for your operating system](https://graphviz.org/download/).
126127

128+
Once you have `tox` and Graphviz installed, you can build the documentation.
127129
To build the documentation with `tox`, run the following command:
128130

129131
```console

0 commit comments

Comments
 (0)