Testing that the script gets tested in the build
This commit is contained in:
parent
6f09a2476b
commit
15f047d7ac
@ -10,6 +10,12 @@ options:
|
|||||||
docker: true
|
docker: true
|
||||||
|
|
||||||
pipelines:
|
pipelines:
|
||||||
|
image: python:3.6.2-slim
|
||||||
|
pipelines:
|
||||||
|
default:
|
||||||
|
- step:
|
||||||
|
script:
|
||||||
|
- python dragon-bot.py test
|
||||||
branches:
|
branches:
|
||||||
master:
|
master:
|
||||||
- step:
|
- step:
|
||||||
|
@ -7,6 +7,7 @@ import logging
|
|||||||
import os
|
import os
|
||||||
import random
|
import random
|
||||||
import requests
|
import requests
|
||||||
|
import sys
|
||||||
import time
|
import time
|
||||||
|
|
||||||
# Client object
|
# Client object
|
||||||
@ -255,4 +256,8 @@ async def on_message(message):
|
|||||||
else:
|
else:
|
||||||
await client.send_message(message.channel, "There arent {} lines of output yet".format(num_lines))
|
await client.send_message(message.channel, "There arent {} lines of output yet".format(num_lines))
|
||||||
|
|
||||||
|
# Check if there is a command line argument after script
|
||||||
|
if len(sys.argv) > 1:
|
||||||
|
print("If you're seeing this, the python compiled")
|
||||||
|
sys.exit()
|
||||||
client.run(botToken)
|
client.run(botToken)
|
Loading…
x
Reference in New Issue
Block a user