From 2b29943fdd8bc0cee5c5fbf3ab1cbc65496278ec Mon Sep 17 00:00:00 2001 From: Fabrizio Finozzi Date: Thu, 10 Apr 2025 16:22:07 +0200 Subject: [PATCH] code: add Makefile --- .github/workflows/ci.yaml | 10 +++------- Makefile | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+), 7 deletions(-) create mode 100644 Makefile diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ad92c078..aad4ff16 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -38,15 +38,11 @@ jobs: - name: Run unit tests run: | - python -m pytest test + make unit-test - - name: Test snakemake workflow for compile_cost_assumptions + - name: Test snakemake workflows run: | - snakemake --cores all -f compile_cost_assumptions - - - name: Test snakemake workflow for compile_cost_assumptions_usa - run: | - snakemake --cores all -f compile_cost_assumptions_usa + make test - name: Upload artifacts uses: actions/upload-artifact@v4 diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..2f5cf53a --- /dev/null +++ b/Makefile @@ -0,0 +1,19 @@ +# SPDX-FileCopyrightText: Contributors to technology-data +# +# SPDX-License-Identifier: GPL-3.0-only + +# coding: utf-8 + +.ONESHELL: + +.PHONY: test unit-test + +# Run default tests +test: + set -e + snakemake --cores all -f compile_cost_assumptions --configfile config.yaml + snakemake --cores all -f compile_cost_assumptions_usa --configfile config.yaml + echo "All tests completed successfully." + +unit-test: + pytest test