Skip to content

Commit

Permalink
Add Docker Compose file for running tests locally in a container
Browse files Browse the repository at this point in the history
  • Loading branch information
ihalaij1 committed May 2, 2024
1 parent a3443f6 commit 088d81b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@ ARG GECKODRIVER_LINK=https://github.com/mozilla/geckodriver/releases/download/v$
ENV DEBIAN_FRONTEND=noninteractive

RUN apt update -y && apt install -y python3 python3-pip git gettext curl firefox docker.io rsync
RUN pip3 install --upgrade pip setuptools wheel

# install python requirements
COPY requirements.txt requirements.txt
RUN pip install -r requirements.txt
RUN pip install --break-system-packages -r requirements.txt
RUN rm requirements.txt

# install geckodriver for selenium
Expand Down
14 changes: 14 additions & 0 deletions docker-compose.test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: '3'

# Run tests:
# docker-compose -f docker-compose.test.yml up gitmanager_unit

services:
gitmanager_unit:
build:
context: .
dockerfile: .github/workflows/Dockerfile
volumes:
- .:/gitmanager
working_dir: /gitmanager
command: python3 manage.py test

0 comments on commit 088d81b

Please sign in to comment.