Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ RUN apt-get update \
WORKDIR /workspaces/python-wiremock
COPY pyproject.toml uv.lock ./
ENV UV_PROJECT_ENVIRONMENT=/usr/local
RUN uv sync --frozen
RUN uv sync --frozen --extra testing
9 changes: 9 additions & 0 deletions .devcontainer/devcontainer-lock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:4.1.2": {
"version": "4.1.2",
"resolved": "ghcr.io/devcontainers/features/docker-in-docker@sha256:ad3d6d36d95ee7f880f61f98862257f3e70253d3faef09f86af42fb87ee60429",
"integrity": "sha256:ad3d6d36d95ee7f880f61f98862257f3e70253d3faef09f86af42fb87ee60429"
}
}
}
8 changes: 7 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
"dockerfile": "Dockerfile",
"context": ".."
},
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:4.1.2": {
"version": "latest",
"moby": false
}
},
"overrideCommand": true,
"customizations": {
"vscode": {
Expand All @@ -13,4 +19,4 @@
]
}
}
}
}
13 changes: 13 additions & 0 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,26 @@ file in the directory.
When adding new examples,
make sure to update the [documentation site page](./examples.md) too.

## Testing

To run tests in the Dev Container, just invoke the test scripts in the root directory:

```shell
sh run_tests.sh
```

For local developer environments, you may also need to run `uv sync --extra testing`
to get all the test modules installed.


## Working on Documentation

The documentation is powered by [MkDocs](https://www.mkdocs.org/) and [ReadTheDocs](https://readthedocs.org/).
All the necessary dependencies are included into the pyproject definition.
To build the docs locally:

```bash
cd docs
uv run mkdocs build --site-dir=html
```

Expand Down
9 changes: 8 additions & 1 deletion run_tests.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
#!/bin/sh

rm -Rf build/ dist/ wiremock.egg-info coverage/ wiremock/tests/coverage/ html/ || true
uv run pytest --cov=wiremock --tb=short
# Container tests need a Docker daemon.
if docker info >/dev/null 2>&1; then
set --
else
echo "Docker not available, skipping tests/test_containers.py"
set -- --ignore=tests/test_containers.py
fi
uv run pytest tests/ --cov=wiremock --tb=short "$@"
Loading