From a5fd026ed6949428f18486973737860d62a0b99c Mon Sep 17 00:00:00 2001 From: Pascal Lais Date: Sun, 5 Dec 2021 14:30:22 +0100 Subject: [PATCH] Add drone pipeline to run all days --- drone.yml | 9 +++++++++ run_all.py | 14 ++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 drone.yml create mode 100644 run_all.py diff --git a/drone.yml b/drone.yml new file mode 100644 index 0000000..2674d70 --- /dev/null +++ b/drone.yml @@ -0,0 +1,9 @@ +kind: pipeline +type: docker +name: default + +steps: +- name: run + image: python + commands: + - python3 run_all.py \ No newline at end of file diff --git a/run_all.py b/run_all.py new file mode 100644 index 0000000..56043ec --- /dev/null +++ b/run_all.py @@ -0,0 +1,14 @@ +#!/usr/bin/python3 + +from os import listdir +from os.path import isdir, isfile +from subprocess import run + + +for dir in [x for x in listdir('.') if isdir(x)]: + file = dir + '/' + dir + '.py' + input = dir + '/input.txt' + if isfile(file) and isfile(input): + print(dir, 'result:') + run(["python3", file]) +