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