.gitlab-ci.yml updated v44

This commit is contained in:
Ivan Nikolaev-Axenov 2024-05-31 17:05:03 +03:00
parent 9926a0feff
commit caf06224cb

View file

@ -11,7 +11,7 @@ CLR_TEST_DIR = os.environ['CLR_TEST_DIR']
def run_docker(folder_name):
print(f"Running docker-compose for {folder_name}")
os.chdir(CLR_TEST_DIR)
subprocess.call("docker compose down --volumes", shell=True)
#subprocess.call("docker compose down --volumes", shell=True)
subprocess.call("docker compose up --build --abort-on-container-exit --exit-code-from clearing_system", shell=True)
os.chdir("..")
@ -25,13 +25,6 @@ def main():
shutil.copytree(f"{DATA_ROOT_DIR}/{folders[0]}/db/", f"{CLR_TEST_DIR}/db/", dirs_exist_ok=True)
shutil.copytree(f"{DATA_ROOT_DIR}/{folders[0]}/clearing_testing_utils/", f"{CLR_TEST_DIR}/clearing-all/clearing_testing_utils/", dirs_exist_ok=True)
run_docker(folders[0])
shutil.rmtree(f"{CLR_TEST_DIR}/clearing-all/clearing_testing_utils/store/expected")
shutil.rmtree(f"{CLR_TEST_DIR}/clearing-all/clearing_testing_utils/store/input")
os.remove(f"{CLR_TEST_DIR}/db/export.sql")
os.remove(f"{CLR_TEST_DIR}/db/test-data.sql")
shutil.copytree(f"{DATA_ROOT_DIR}/{folders[1]}/db/", f"{CLR_TEST_DIR}/db/", dirs_exist_ok=True)
shutil.copytree(f"{DATA_ROOT_DIR}/{folders[1]}/clearing_testing_utils/", f"{CLR_TEST_DIR}/clearing-all/clearing_testing_utils/", dirs_exist_ok=True)
run_docker(folders[1])
# for folder in folders:
# shutil.rmtree(f"{CLR_TEST_DIR}/clearing-all/clearing_testing_utils/store")
# os.remove(f"{CLR_TEST_DIR}/db/export.sql")