Skip to content

Commit ce56dcd

Browse files
authored
config: add unit tests executions (#174)
* config: add unit tests exeutions * docu: update release_notes * config: compile_cost_assumptions_usa * config: change on key * config: modify ci.yaml * modify the way pytest is executed * update the ci.yaml * name CI in ci.yaml * pre-commit
1 parent a27f93f commit ce56dcd

File tree

2 files changed

+35
-4
lines changed

2 files changed

+35
-4
lines changed

.github/workflows/ci.yaml

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,53 @@
11
name: CI
22

3-
on: [push]
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
schedule:
9+
- cron: "0 5 * * 0"
10+
11+
12+
# Cancel any in-progress runs when a new run is triggered
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: true
416

517
jobs:
618
build:
19+
name: CI
720
runs-on: ubuntu-latest
21+
22+
defaults:
23+
run:
24+
shell: bash -l {0}
25+
826
steps:
927
- uses: actions/checkout@v4
10-
- uses: mamba-org/setup-micromamba@v2
28+
29+
- name: Setup micromamba
30+
uses: mamba-org/setup-micromamba@v2
1131
with:
1232
micromamba-version: latest
1333
environment-file: environment.yaml
1434
log-level: debug
1535
init-shell: bash
1636
cache-environment: true
1737
cache-downloads: true
18-
- name: Test snakemake workflow
19-
shell: bash -l {0}
38+
39+
- name: Run unit tests
40+
run: |
41+
python -m pytest test
42+
43+
- name: Test snakemake workflow for compile_cost_assumptions
2044
run: |
2145
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
50+
2251
- name: Upload artifacts
2352
uses: actions/upload-artifact@v4
2453
with:

docs/release_notes.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ Upcoming Release
1616
.. The features listed below are not released yet, but will be part of the next release!
1717
.. To use the features already you have to use the ``master`` branch.
1818
19+
* Include unit test execution and compile_cost_assumptions_usa.py in ci.yaml (https://github.com/PyPSA/technology-data/pull/174)
20+
1921
`v0.11.0 <https://github.com/PyPSA/technology-data/releases/tag/v0.11.0>`__ (24th January 2025)
2022
=======================================================================================
2123

0 commit comments

Comments
 (0)