Skip to content

Commit 72cab32

Browse files
committed
Add doc build to CI for python-client
Closes GSK-1685
1 parent f71ae82 commit 72cab32

2 files changed

Lines changed: 11 additions & 9 deletions

File tree

.github/workflows/build-python-client.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,10 @@ jobs:
4444
uses: actions/checkout@v3.3.0
4545

4646
- name: Setup PDM
47-
uses: pdm-project/setup-pdm@v3
47+
uses: pdm-project/setup-pdm@v34
4848
with:
49+
working-directory: python-client
50+
4951
python-version: ${{ matrix.python-version }}
5052
cache: true
5153
cache-dependency-path: 'python-client/pdm.lock'
@@ -68,26 +70,25 @@ jobs:
6870

6971
- name: Lint code
7072
working-directory: python-client
71-
run: pdm lint
73+
run: pdm run lint
7274

7375
- name: Test code
7476
working-directory: python-client
7577
env:
7678
PYTEST_XDIST_AUTO_NUM_WORKERS: 1
77-
run: pdm test-fast
79+
run: pdm run test-fast
7880

79-
- name: Build
81+
- name: Build doc
8082
working-directory: python-client
81-
run: pdm build
83+
run: pdm run doc
8284

83-
- name: Package
85+
- name: Build
8486
working-directory: python-client
85-
run: pdm package
87+
run: pdm build
8688

8789
- name: "Python client: archive built artifacts"
8890
if: ${{ steps.extract_branch.outputs.branch == 'main' && matrix.os == 'ubuntu-latest' && matrix.python-version == '3.10' }}
8991
uses: actions/upload-artifact@v3
9092
with:
91-
name: giskard-dev.whl
9293
path: python-client/dist/*whl
9394

python-client/pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ test.cmd = "pytest -c pyproject.toml tests --cov=giskard --cov-report=xml --disa
3131
# for some reason github runners don't work when calling 'pdm test -m "not slow"'
3232
test-fast.cmd = "pytest -n auto -m 'not slow' -c pyproject.toml tests --cov=giskard --cov-report=xml --disable-warnings --no-header -vv --durations=0"
3333
lint = "ruff giskard tests"
34-
doc = "python -m sphinx_autobuild --watch giskard docs docs/_build/html"
34+
doc = "sphinx-build docs docs/_build/html"
35+
watch-doc = "python -m sphinx_autobuild --watch giskard docs docs/_build/html"
3536
clean = "rm -rf .venv coverage.xml coverage*"
3637

3738
[tool.pdm.dev-dependencies]

0 commit comments

Comments
 (0)