-
Notifications
You must be signed in to change notification settings - Fork 86
54 lines (44 loc) · 1.2 KB
/
ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# SPDX-FileCopyrightText: : 2021 The PyPSA-Eur Authors
#
# SPDX-License-Identifier: CC0-1.0
name: CI
on:
push:
branches:
- new-main
pull_request:
branches:
- new-main
schedule:
- cron: "0 5 * * TUE"
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 5
matrix:
os:
- ubuntu-latest
- macos-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 --cores 1 solve_all_networks
rm -rf resources/*.nc resources/*.geojson resources/*.h5 networks results