Skip to content

Commit d44ac92

Browse files
authored
code: add Makefile (#204)
1 parent 61b7122 commit d44ac92

File tree

2 files changed

+22
-7
lines changed

2 files changed

+22
-7
lines changed

.github/workflows/ci.yaml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,11 @@ jobs:
3838

3939
- name: Run unit tests
4040
run: |
41-
python -m pytest test
41+
make unit-test
4242
43-
- name: Test snakemake workflow for compile_cost_assumptions
43+
- name: Test snakemake workflows
4444
run: |
45-
snakemake --cores all -f compile_cost_assumptions
46-
47-
- name: Test snakemake workflow for compile_cost_assumptions_usa
48-
run: |
49-
snakemake --cores all -f compile_cost_assumptions_usa
45+
make test
5046
5147
- name: Upload artifacts
5248
uses: actions/upload-artifact@v4

Makefile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# SPDX-FileCopyrightText: Contributors to technology-data <https://github.com/pypsa/technology-data>
2+
#
3+
# SPDX-License-Identifier: GPL-3.0-only
4+
5+
# coding: utf-8
6+
7+
.ONESHELL:
8+
9+
.PHONY: test unit-test
10+
11+
# Run default tests
12+
test:
13+
set -e
14+
snakemake --cores all -f compile_cost_assumptions --configfile config.yaml
15+
snakemake --cores all -f compile_cost_assumptions_usa --configfile config.yaml
16+
echo "All tests completed successfully."
17+
18+
unit-test:
19+
pytest test

0 commit comments

Comments
 (0)