Testing that the script gets tested in the build

This commit is contained in:
Luke Robles 2017-08-05 12:14:08 -07:00
parent 6f09a2476b
commit 15f047d7ac
2 changed files with 11 additions and 0 deletions

View File

@ -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:

View File

@ -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)