-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from partio-scout/tests
Automated testing
- Loading branch information
Showing
8 changed files
with
60 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
name: Automated tests | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
sqlite: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- run: bash -x scripts/citest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
*.pyc | ||
src | ||
env* | ||
*.orig | ||
*.rej |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
FROM ubuntu:12.04 | ||
FROM python:2 | ||
|
||
MAINTAINER siimeon<[email protected]> | ||
WORKDIR /app/web | ||
|
||
RUN apt-get update && apt-get install -y python python-django git | ||
COPY . /app/ | ||
|
||
RUN git clone https://github.com/siimeon/Kipa.git /root/kipa | ||
RUN echo "PYTHONPATH=/usr/local/lib/python2.7/site-packages" | tee -a /etc/profile | ||
|
||
EXPOSE 8000 | ||
ENTRYPOINT ["/app/docker-entrypoint.sh"] | ||
|
||
WORKDIR /root/kipa/web | ||
EXPOSE 3000 | ||
|
||
CMD git pull && python manage.py runserver 0.0.0.0:8000 | ||
CMD ["./manage.py", "runserver", "0.0.0.0:3000"] | ||
|
||
RUN pip install -r /app/requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
version: '3' | ||
services: | ||
web: | ||
build: . | ||
ports: | ||
- 3000:3000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
|
||
export PYTHONPATH="/usr/local/lib/python2.7/site-packages" | ||
|
||
exec "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
#django | ||
#django==1.2.7 | ||
#https://www.djangoproject.com/download/1.2.7/tarball/ | ||
-e git+https://github.com/django/[email protected]#egg=django | ||
git+https://github.com/django/[email protected]#egg=django | ||
south | ||
#mysql-python | ||
-e git+https://github.com/PyMySQL/mysqlclient-python.git#egg=MySQLdb | ||
git+https://github.com/PyMySQL/mysqlclient-python.git@v1.4.6#egg=MySQLdb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
docker_compose="docker-compose --file docker-compose.yml" | ||
|
||
function cleanup() { | ||
$docker_compose down | ||
} | ||
|
||
function die() { | ||
echo $@ | ||
exit 1 | ||
} | ||
|
||
trap cleanup EXIT | ||
|
||
$docker_compose build | ||
$docker_compose up -d | ||
$docker_compose run web './manage.py' test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters