Skip to content

Commit

Permalink
Add test combined
Browse files Browse the repository at this point in the history
  • Loading branch information
julianbelina committed Feb 22, 2024
1 parent f23104f commit e6a34f3
Show file tree
Hide file tree
Showing 3 changed files with 216 additions and 147 deletions.
201 changes: 135 additions & 66 deletions .github/workflows/test_combined.yml
Original file line number Diff line number Diff line change
@@ -1,68 +1,137 @@
# 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
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
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"]
# steps:
# - name: Checkout Fine
# uses: actions/checkout@v4
# with:
# repository: FZJ-IEK3-VSA/FINE
# path: './fine'
# - name: Checkout geokit
# uses: actions/checkout@v4
# with:
# repository: FZJ-IEK3-VSA/geokit
# path: './geokit'
# - name: Checkout glaes
# uses: actions/checkout@v4
# with:
# repository: FZJ-IEK3-VSA/glaes
# path: './glaes'
# - name: Checkout Reskit
# uses: actions/checkout@v4
# with:
# repository: FZJ-IEK3-VSA/RESKit
# path: './reskit'
# - uses: conda-incubator/setup-miniconda@v3
# with:
# miniforge-version: latest
# channels: conda-forge
# activate-environment: test_env
# - name: Run tests
# shell: pwsh
# run: |
# ls
# echo "LS Done"
# mamba install fine geokit glaes reskit pytest
# echo "Installation done"
# conda list
# echo "libaries printed"
# echo "start pytest"
# pytest
# echo "Pytest done"
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 fine geokit glaes reskit pytest=6.2.4 scikit-learn=1.1.3
echo "Installation done"
conda list
echo "libaries printed"
$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
$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.install-step.outputs.FINE_VERSION }}
fetch-depth: 0
- name: Checkout geokit
uses: actions/checkout@v4
with:
repository: FZJ-IEK3-VSA/geokit
path: './geokit'
ref: ${{ steps.install-step.outputs.GEOKIT_VERSION }}
fetch-depth: 0
- name: Checkout glaes
uses: actions/checkout@v4
with:
repository: FZJ-IEK3-VSA/glaes
path: './glaes'
ref: ${{ steps.install-step.outputs.GLAES_VERSION }}
fetch-depth: 0
- name: Checkout Reskit
uses: actions/checkout@v4
with:
repository: FZJ-IEK3-VSA/RESKit
path: './reskit'
ref: ${{ steps.install-step.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"
96 changes: 48 additions & 48 deletions .github/workflows/test_fine.yml
Original file line number Diff line number Diff line change
@@ -1,50 +1,50 @@
name: Run combined tests for fine
on:
workflow_dispatch:
inputs:
tags:
description: 'Manual run'
push:
branches:
- dev
# name: Run combined tests for fine
# on:
# workflow_dispatch:
# inputs:
# tags:
# description: 'Manual run'
# push:
# branches:
# - dev


jobs:
TestGeokitCondaForge:
name: Test (${{ matrix.fine-version }}, on ${{ 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"]
# fine-version: ["2.3.4","2.3.3","2.3.2","2.3.1","2.3.0","2.2.3","2.2.2"]
fine-version: ["2.3.2","2.3.1","2.3.0","2.2.3","2.2.2"]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
repository: FZJ-IEK3-VSA/FINE
path: './fine'
ref: v${{ matrix.fine-version }}
fetch-depth: 0
- uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: latest
channels: conda-forge
activate-environment: test_env
- name: Run tests
shell: pwsh
run: |
ls
echo "LS Done"
echo ${{ matrix.fine-version }}
echo "Fine version is printed"
mamba install -n test_env fine=${{ matrix.fine-version }} pytest=6.2.4 scikit-learn=1.1.3
echo "Installation done"
conda list
echo "libaries printed"
ls
cd fine
echo "start pytest"
conda run -n test_env python -m pytest test/
echo "Pytest done"
# jobs:
# TestGeokitCondaForge:
# name: Test (${{ matrix.fine-version }}, on ${{ 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"]
# # fine-version: ["2.3.4","2.3.3","2.3.2","2.3.1","2.3.0","2.2.3","2.2.2"]
# fine-version: ["2.3.2","2.3.1","2.3.0","2.2.3","2.2.2"]
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# with:
# repository: FZJ-IEK3-VSA/FINE
# path: './fine'
# ref: v${{ matrix.fine-version }}
# fetch-depth: 0
# - uses: conda-incubator/setup-miniconda@v3
# with:
# miniforge-version: latest
# channels: conda-forge
# activate-environment: test_env
# - name: Run tests
# shell: pwsh
# run: |
# ls
# echo "LS Done"
# echo ${{ matrix.fine-version }}
# echo "Fine version is printed"
# mamba install -n test_env fine=${{ matrix.fine-version }} pytest=6.2.4 scikit-learn=1.1.3
# echo "Installation done"
# conda list
# echo "libaries printed"
# ls
# cd fine
# echo "start pytest"
# conda run -n test_env python -m pytest test/
# echo "Pytest done"
66 changes: 33 additions & 33 deletions .github/workflows/test_geokit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,36 +51,36 @@
# echo "start pytest"
# conda run -n test_env pytest
# echo "Pytest done"
# # TestGeokitDevLocal:
# # 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"]
# # steps:
# # - name: Checkout
# # uses: actions/checkout@v4
# # with:
# # repository: FZJ-IEK3-VSA/geokit
# # path: './geokit'
# # - uses: conda-incubator/setup-miniconda@v3
# # with:
# # miniforge-version: latest
# # channels: conda-forge
# # activate-environment: test_env
# # - name: Run tests
# # shell: pwsh
# # run: |
# # ls
# # echo "LS Done"
# # cd geokit
# # ls
# # mamba env create --name geokit_env --yes --file requirements-dev.yml
# # conda run --name geokit_env pip install . --no-deps
# # echo "Installation done"
# # conda list --name geokit_env
# # echo "libaries printed"
# # echo "start pytest"
# # conda run --name geokit_env pytest
# # echo "Pytest done"
# TestGeokitDevLocal:
# 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"]
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# with:
# repository: FZJ-IEK3-VSA/geokit
# path: './geokit'
# - uses: conda-incubator/setup-miniconda@v3
# with:
# miniforge-version: latest
# channels: conda-forge
# activate-environment: test_env
# - name: Run tests
# shell: pwsh
# run: |
# ls
# echo "LS Done"
# cd geokit
# ls
# mamba env create --name geokit_env --yes --file requirements-dev.yml
# conda run --name geokit_env pip install . --no-deps
# echo "Installation done"
# conda list --name geokit_env
# echo "libaries printed"
# echo "start pytest"
# conda run --name geokit_env pytest
# echo "Pytest done"

0 comments on commit e6a34f3

Please sign in to comment.