Merged in test_during_build (pull request #10)
Making the dockerfile test the python code during the build Approved-by: Tyler Hodapp <nightfire929@gmail.com>
This commit is contained in:
commit
4e808e692b
@ -5,4 +5,8 @@ RUN apt-get update && apt-get install curl -y &&\
|
|||||||
RUN pip install requests discord.py docker pybooru termcolor
|
RUN pip install requests discord.py docker pybooru termcolor
|
||||||
|
|
||||||
ADD app /app
|
ADD app /app
|
||||||
|
|
||||||
|
# Run this to test that the python compiles when we actually go live
|
||||||
|
RUN python /app/dragon-bot.py test
|
||||||
|
|
||||||
CMD python app/dragon-bot.py
|
CMD python app/dragon-bot.py
|
@ -9,12 +9,12 @@ A discord bot for the trifecta discord channel
|
|||||||
### How do I get set up? ###
|
### How do I get set up? ###
|
||||||
|
|
||||||
* You'll need to install docker
|
* You'll need to install docker
|
||||||
* as root (`sudo -s`)
|
* as root (`sudo -s`)
|
||||||
* `curl -Ls get.docker.com | bash`
|
* `curl -Ls get.docker.com | bash`
|
||||||
|
|
||||||
### Testing your changes ###
|
### Testing your changes ###
|
||||||
* There is a bash file in the root of the repo, `test_container.sh`
|
* Test that you can actually build the container
|
||||||
* run this to validate your python syntax. On first run, it will take a while to build
|
* `docker build -t testing .`
|
||||||
* pipeline [here](https://cloud.docker.com/app/ldooks/repository/docker/ldooks/dragon-bot/builds)
|
* pipeline [here](https://cloud.docker.com/app/ldooks/repository/docker/ldooks/dragon-bot/builds)
|
||||||
|
|
||||||
### Contribution guidelines ###
|
### Contribution guidelines ###
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
printf "\nStarting tests\n"
|
|
||||||
|
|
||||||
printf "Building docker container\n"
|
|
||||||
docker build -t tests .
|
|
||||||
|
|
||||||
printf "Running docker container to test your python code\n"
|
|
||||||
docker run --rm tests python /app/dragon-bot.py test
|
|
Loading…
x
Reference in New Issue
Block a user