Add drone pipeline to run all days

This commit is contained in:
2021-12-05 14:30:22 +01:00
parent 4f7907b17c
commit a5fd026ed6
2 changed files with 23 additions and 0 deletions

9
drone.yml Normal file
View File

@@ -0,0 +1,9 @@
kind: pipeline
type: docker
name: default
steps:
- name: run
image: python
commands:
- python3 run_all.py

14
run_all.py Normal file
View File

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