-
Notifications
You must be signed in to change notification settings - Fork 0
141 lines (133 loc) · 5.35 KB
/
test_combined.yml
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
name: Run combined tests for fine, geokit, glaes and reskit
on:
workflow_dispatch:
inputs:
tags:
description: 'Manual run'
push:
branches:
- main
pull_request:
branches:
- main
# Allows to trigger the workflow manually
schedule:
# * is a special character in YAML so you have to quote this string
# Some Examples for cron syntax https://crontab.guru/examples.html
# Schedules job at any point after 12 pm
- cron: '0 0 * * *'
# Weekly after sunday
# - cron: 0 0 * * 0
jobs:
TestCombinedInstalaltions:
name: Ex1 (${{ matrix.python-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# os: ["ubuntu-latest","ubuntu-20.04", "macos-latest","macos-13","macos-12", "macos-11","windows-latest","windows-2019"]
os: ["ubuntu-latest"]
steps:
- uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: latest
channels: conda-forge
activate-environment: test_env
- name: Install libraries
shell: pwsh
id: install-step
run: |
ls
echo "LS Done"
mamba install -n test_env fine geokit glaes reskit pytest=6.2.4 scikit-learn=1.1.3
echo "Installation done"
conda list -n test_env
echo "libaries printed"
- name: Get fine version
shell: pwsh
id: fine-version
run: |
$FINE_STRING = conda run -n test_env conda list -e fine | Out-String
FINE_VERSION = [regex]::Match($FINE_STRING, 'fine=(\d+\.\d+\.\d+)=').Groups[1].Value
echo "FINE_VERSION=$FINE_VERSION" >> $GITHUB_OUTPUT
- name: Get fine version
shell: pwsh
id: other-version
run: |
$GEOKIT_STRING = conda run -n test_env conda list -e geokit | Out-String
$GEOKIT_VERSION = [regex]::Match($GEOKIT_STRING, 'geokit=(\d+\.\d+\.\d+)=').Groups[1].Value
echo "GEOKIT_VERSION=$GEOKIT_VERSION" >> $GITHUB_OUTPUT
$GLAES_STRING = conda run -n test_env conda list -e geokit | Out-String
$GLAES_VERSION = [regex]::Match($GLAES_STRING, 'glaes=(\d+\.\d+\.\d+)=').Groups[1].Value
echo "GLAES_VERSION=$GLAES_VERSION" >> $GITHUB_OUTPUT
$RESKIT_STRING = conda run -n test_env conda list -e reskit | Out-String
$RESKIT_VERSION = [regex]::Match($RESKIT_STRING, 'glaes=(\d+\.\d+\.\d+)=').Groups[1].Value
echo "RESKIT_VERSION=$RESKIT_VERSION" >> $GITHUB_OUTPUT
- name: Checkout Fine
uses: actions/checkout@v4
with:
repository: FZJ-IEK3-VSA/FINE
path: './fine'
ref: v${{ steps.fine-version.outputs.FINE_VERSION }}
fetch-depth: 0
- name: Checkout geokit
uses: actions/checkout@v4
with:
repository: FZJ-IEK3-VSA/geokit
path: './geokit'
ref: ${{ steps.other-version.outputs.GEOKIT_VERSION }}
fetch-depth: 0
- name: Checkout glaes
uses: actions/checkout@v4
with:
repository: FZJ-IEK3-VSA/glaes
path: './glaes'
ref: ${{ steps.other-version.outputs.GLAES_VERSION }}
fetch-depth: 0
- name: Checkout Reskit
uses: actions/checkout@v4
with:
repository: FZJ-IEK3-VSA/RESKit
path: './reskit'
ref: ${{ steps.other-version.outputs.RESKIT_VERSION }}
fetch-depth: 0
- name: Run pytest for fine
shell: pwsh
run: |
echo "Start ls"
ls
echo "ls terminated"
cd fine
echo "start pytest"
conda run -n test_env python -m pytest test/
echo "Pytest done"
- name: Run pytest for geokit
shell: pwsh
run: |
echo "Start ls"
ls
echo "ls terminated"
cd geokit
echo "start pytest"
conda run -n test_env python -m pytest
echo "Pytest done"
- name: Run pytest for glaes
shell: pwsh
run: |
echo "Start ls"
ls
echo "ls terminated"
cd glaes
echo "start pytest"
conda run -n test_env python -m pytest
echo "Pytest done"
- name: Run pytest for reskit
shell: pwsh
run: |
echo "Start ls"
ls
echo "ls terminated"
cd reskit
echo "start pytest"
conda run -n test_env python -m pytest
echo "Pytest done"