From 15f047d7ac6898abb065e8f7bd4f8d0ef0c1511c Mon Sep 17 00:00:00 2001 From: Luke Robles Date: Sat, 5 Aug 2017 12:14:08 -0700 Subject: [PATCH] Testing that the script gets tested in the build --- bitbucket-pipelines.yml | 6 ++++++ dragon-bot.py | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml index 3fa6710f..f6bb14f0 100644 --- a/bitbucket-pipelines.yml +++ b/bitbucket-pipelines.yml @@ -10,6 +10,12 @@ options: docker: true pipelines: +image: python:3.6.2-slim +pipelines: + default: + - step: + script: + - python dragon-bot.py test branches: master: - step: diff --git a/dragon-bot.py b/dragon-bot.py index de719b59..f76836b5 100644 --- a/dragon-bot.py +++ b/dragon-bot.py @@ -7,6 +7,7 @@ import logging import os import random import requests +import sys import time # Client object @@ -255,4 +256,8 @@ async def on_message(message): else: 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) \ No newline at end of file