Skip to content

Commit

Permalink
GitHub actions CI (#252)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
fneum authored Jun 22, 2021
1 parent bfeb429 commit 7b68e8b
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 44 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# SPDX-FileCopyrightText: : 2021 The PyPSA-Eur Authors
#
# SPDX-License-Identifier: CC0-1.0

name: CI

on: [push]

jobs:
build:

runs-on: ${{ matrix.os }}
strategy:
max-parallel: 5
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest

defaults:
run:
shell: bash -l {0}

steps:

- uses: actions/checkout@v2

- name: Setup Miniconda
uses: conda-incubator/[email protected]
with: # checks out environment 'test' by default
mamba-version: "*"
channels: conda-forge,defaults
channel-priority: true

- name: Install dependencies
run: |
echo -ne "url: ${CDSAPI_URL}\nkey: ${CDSAPI_TOKEN}\n" > ~/.cdsapirc
echo -e " - glpk\n - ipopt<3.13.3" >> envs/environment.yaml
mamba env update -f envs/environment.yaml --name test
- name: Test snakemake workflow
run: |
conda list
cp test/config.test1.yaml config.yaml
snakemake -j all solve_all_networks
rm -rf resources/*.nc resources/*.geojson resources/*.h5 networks results
39 changes: 0 additions & 39 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ SPDX-License-Identifier: CC-BY-4.0
-->

![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/pypsa/pypsa-eur?include_prereleases)
[![Build Status](https://travis-ci.org/PyPSA/pypsa-eur.svg?branch=master)](https://travis-ci.org/PyPSA/pypsa-eur)
[![Build Status](https://github.com/pypsa/pypsa-eur/actions/workflows/ci.yaml/badge.svg)](https://github.com/PyPSA/pypsa-eur/actions)
[![Documentation](https://readthedocs.org/projects/pypsa-eur/badge/?version=latest)](https://pypsa-eur.readthedocs.io/en/latest/?badge=latest)
![Size](https://img.shields.io/github/repo-size/pypsa/pypsa-eur)
[![Zenodo](https://zenodo.org/badge/DOI/10.5281/zenodo.3520874.svg)](https://doi.org/10.5281/zenodo.3520874)
Expand Down
4 changes: 2 additions & 2 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ PyPSA-Eur: An Open Optimisation Model of the European Transmission System
.. image:: https://img.shields.io/github/v/release/pypsa/pypsa-eur?include_prereleases
:alt: GitHub release (latest by date including pre-releases)

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

.. image:: https://readthedocs.org/projects/pypsa-eur/badge/?version=latest
:target: https://pypsa-eur.readthedocs.io/en/latest/?badge=latest
Expand Down
1 change: 1 addition & 0 deletions doc/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Upcoming Release
* 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>`_].
* 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>`_].
* 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>`_].
* Continuous integration testing switches to Github Actions from Travis CI [`#252 <https://github.com/PyPSA/pypsa-eur/pull/252>`_].

PyPSA-Eur 0.3.0 (7th December 2020)
==================================
Expand Down
4 changes: 2 additions & 2 deletions test/config.test1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ countries: ['DE']

snapshots:
start: "2013-03-01"
end: "2014-04-01"
end: "2013-03-08"
closed: 'left' # end is not inclusive

enable:
Expand Down Expand Up @@ -57,7 +57,7 @@ atlite:
module: era5
x: [4., 15.]
y: [46., 56.]
time: ["2013-03", "2013-03"]
time: ["2013-03-01", "2013-03-08"]

renewable:
onwind:
Expand Down

0 comments on commit 7b68e8b

Please sign in to comment.