Skip to content

Commit 7b68e8b

Browse files
authored
GitHub actions CI (#252)
* add github action ci * only one environment update call * line break in echo did not work * fix syntax * fix version syntax * switch to glpk * reduce time from month to week * list environment * use new ipopt version conda-forge/ipopt-feedstock#55 * remove accidental additions * request ipopt lower than 3.13.3 conda-forge/ipopt-feedstock#64 * add badges and release notes * add badge to readme and make ci.yaml cc-0
1 parent bfeb429 commit 7b68e8b

File tree

6 files changed

+53
-44
lines changed

6 files changed

+53
-44
lines changed

.github/workflows/ci.yaml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# SPDX-FileCopyrightText: : 2021 The PyPSA-Eur Authors
2+
#
3+
# SPDX-License-Identifier: CC0-1.0
4+
5+
name: CI
6+
7+
on: [push]
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
max-parallel: 5
15+
matrix:
16+
os:
17+
- ubuntu-latest
18+
- macos-latest
19+
- windows-latest
20+
21+
defaults:
22+
run:
23+
shell: bash -l {0}
24+
25+
steps:
26+
27+
- uses: actions/checkout@v2
28+
29+
- name: Setup Miniconda
30+
uses: conda-incubator/setup-miniconda@v2.1.1
31+
with: # checks out environment 'test' by default
32+
mamba-version: "*"
33+
channels: conda-forge,defaults
34+
channel-priority: true
35+
36+
- name: Install dependencies
37+
run: |
38+
echo -ne "url: ${CDSAPI_URL}\nkey: ${CDSAPI_TOKEN}\n" > ~/.cdsapirc
39+
echo -e " - glpk\n - ipopt<3.13.3" >> envs/environment.yaml
40+
mamba env update -f envs/environment.yaml --name test
41+
42+
- name: Test snakemake workflow
43+
run: |
44+
conda list
45+
cp test/config.test1.yaml config.yaml
46+
snakemake -j all solve_all_networks
47+
rm -rf resources/*.nc resources/*.geojson resources/*.h5 networks results

.travis.yml

-39
This file was deleted.

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ SPDX-License-Identifier: CC-BY-4.0
44
-->
55

66
![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/pypsa/pypsa-eur?include_prereleases)
7-
[![Build Status](https://travis-ci.org/PyPSA/pypsa-eur.svg?branch=master)](https://travis-ci.org/PyPSA/pypsa-eur)
7+
[![Build Status](https://github.com/pypsa/pypsa-eur/actions/workflows/ci.yaml/badge.svg)](https://github.com/PyPSA/pypsa-eur/actions)
88
[![Documentation](https://readthedocs.org/projects/pypsa-eur/badge/?version=latest)](https://pypsa-eur.readthedocs.io/en/latest/?badge=latest)
99
![Size](https://img.shields.io/github/repo-size/pypsa/pypsa-eur)
1010
[![Zenodo](https://zenodo.org/badge/DOI/10.5281/zenodo.3520874.svg)](https://doi.org/10.5281/zenodo.3520874)

doc/index.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ PyPSA-Eur: An Open Optimisation Model of the European Transmission System
99
.. image:: https://img.shields.io/github/v/release/pypsa/pypsa-eur?include_prereleases
1010
:alt: GitHub release (latest by date including pre-releases)
1111

12-
.. image:: https://travis-ci.org/PyPSA/pypsa-eur.svg?branch=master
13-
:target: https://travis-ci.org/PyPSA/pypsa-eur
12+
.. image:: https://github.com/pypsa/pypsa-eur/actions/workflows/ci.yaml/badge.svg
13+
:target: https://github.com/PyPSA/pypsa-eur/actions
1414

1515
.. image:: https://readthedocs.org/projects/pypsa-eur/badge/?version=latest
1616
:target: https://pypsa-eur.readthedocs.io/en/latest/?badge=latest

doc/release_notes.rst

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Upcoming Release
2222
* Fix: Add escape in :mod:`base_network` if all TYNDP links are already contained in the network [`#246 <https://github.com/PyPSA/pypsa-eur/pull/246>`_].
2323
* Bugfix in :mod:`solve_operations_network`: optimised capacities are now fixed for all extendable links, not only HVDC links [`#244 <https://github.com/PyPSA/pypsa-eur/pull/244>`_].
2424
* The ``focus_weights`` are now also considered when pre-clustering in the :mod:`simplify_network` rule [`#241 <https://github.com/PyPSA/pypsa-eur/pull/241>`_].
25+
* Continuous integration testing switches to Github Actions from Travis CI [`#252 <https://github.com/PyPSA/pypsa-eur/pull/252>`_].
2526

2627
PyPSA-Eur 0.3.0 (7th December 2020)
2728
==================================

test/config.test1.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ countries: ['DE']
2020

2121
snapshots:
2222
start: "2013-03-01"
23-
end: "2014-04-01"
23+
end: "2013-03-08"
2424
closed: 'left' # end is not inclusive
2525

2626
enable:
@@ -57,7 +57,7 @@ atlite:
5757
module: era5
5858
x: [4., 15.]
5959
y: [46., 56.]
60-
time: ["2013-03", "2013-03"]
60+
time: ["2013-03-01", "2013-03-08"]
6161

6262
renewable:
6363
onwind:

0 commit comments

Comments
 (0)