Skip to content

Commit

Permalink
Run local tests with Dockerfile instead of shell script
Browse files Browse the repository at this point in the history
  • Loading branch information
infeeeee committed Sep 21, 2024
1 parent 9c07015 commit b687814
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion docs/DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ The project uses [calendar versioning](https://calver.org/):
### Run tests in docker:

```shell
docker run --rm -it -v .:/srv/IoTuring:ro python:3.8.17-slim-bullseye /srv/IoTuring/tests/run_tests.sh
docker run --rm -it $(docker build -q -f tests.Dockerfile .)
```

### Run tests in a venv
Expand Down
11 changes: 11 additions & 0 deletions tests.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM python:3.8.17-slim-bullseye

WORKDIR /root/IoTuring

COPY . .

RUN pip install --no-cache-dir .[test]

CMD python -m pytest

# docker run --rm -it $(docker build -q -f tests.Dockerfile .)
9 changes: 0 additions & 9 deletions tests/run_tests.sh

This file was deleted.

0 comments on commit b687814

Please sign in to comment.