Skip to content

Commit

Permalink
Split workflows, documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ArneVoss committed Jan 11, 2024
1 parent dbffecc commit a39934c
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 57 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# This workflow will try to build and install the software in different ways.

name: Build and installation tests

on:
push:
branches: ['master', 'devel']
pull_request:
branches: '*'

jobs:
pure-pip-installation:
# This stage only tests if the installation is possible.
# The evironment created herein will be discared and re-created in the test stage.
runs-on: ubuntu-latest
strategy:
matrix:
# Add multiple Python versions here to run tests on new(er) versions.
python-version: ["3.10"]
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Build and install
run: |
python -m pip install --upgrade pip
# Install with -e (in editable mode) to allow the tracking of the test coverage
pip install -e .
# Check result of installation
python -c "import loadskernel"
which loads-kernel
which model-viewer
which loads-compare
conda-and-pip-installation:
# This stage only tests if the installation is possible.
# The evironment created herein will be discared and re-created in the test stage.
runs-on: ubuntu-latest
strategy:
matrix:
# Add multiple Python versions here to run tests on new(er) versions.
python-version: ["3.10", "3.11"]
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Build and install
run: |
# Install same requirements as to be used during regression testing
source $CONDA/etc/profile.d/conda.sh
conda activate
conda install -y -c conda-forge --file ./tests/requirements.txt
# Install with -e (in editable mode) to allow the tracking of the test coverage
pip install -e .
# Check result of installation
python -c "import loadskernel"
which loads-kernel
which model-viewer
which loads-compare
60 changes: 3 additions & 57 deletions .github/workflows/regression-tests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# This workflow will install and then lint the code with Flake8 and Pylint.
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

# This workflow will run some regression tests.
name: Regression Tests

on:
Expand All @@ -10,60 +8,6 @@ on:
branches: '*'

jobs:
pure-pip-installation:
# This stage only tests if the installation is possible.
# The evironment created herein will be discared and re-created in the test stage.
runs-on: ubuntu-latest
strategy:
matrix:
# Add multiple Python versions here to run tests on new(er) versions.
python-version: ["3.10"]
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Build and install
run: |
python -m pip install --upgrade pip
# Install with -e (in editable mode) to allow the tracking of the test coverage
pip install -e .
# Check result of installation
python -c "import loadskernel"
which loads-kernel
which model-viewer
which loads-compare
conda-and-pip-installation:
# This stage only tests if the installation is possible.
# The evironment created herein will be discared and re-created in the test stage.
runs-on: ubuntu-latest
strategy:
matrix:
# Add multiple Python versions here to run tests on new(er) versions.
python-version: ["3.10", "3.11"]
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Build and install
run: |
# Install same requirements as to be used during regression testing
source $CONDA/etc/profile.d/conda.sh
conda activate
conda install -y -c conda-forge --file ./tests/requirements.txt
# Install with -e (in editable mode) to allow the tracking of the test coverage
pip install -e .
# Check result of installation
python -c "import loadskernel"
which loads-kernel
which model-viewer
which loads-compare

Pytest:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -102,6 +46,8 @@ jobs:
if-no-files-found: ignore

Jupyter:
# Building the Jupyter book is not really a regression test. However, it has to be in this workflow due to the handling of
# the artifacts.
runs-on: ubuntu-latest
strategy:
matrix:
Expand Down

0 comments on commit a39934c

Please sign in to comment.