Skip to content

Merge pull request #320 from gafusion/profile_plotting_fixes #663

Merge pull request #320 from gafusion/profile_plotting_fixes

Merge pull request #320 from gafusion/profile_plotting_fixes #663

Workflow file for this run

name: Regression tests
on:
push:
branches: [ master ]
pull_request:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip github]')"
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11']
# 3.12 does not yet work because numpy removed numpy.distutils that pygacode relies on
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Extra dependencies required for 3.7
if: ${{matrix.python-version == '3.7'}}
run: |
sudo apt-get update
sudo apt-get install libhdf5-dev libnetcdf-dev
- name: Install numpy
run: |
python3 -m pip install numpy
- name: Install dependencies
run: |
python3 -m pip install -r requirements.txt
# numpy is a build time dependency of pygacode
# but before pygacode 1.0 it did not specify its build dependencies correctly
# and pygacode requires python >= 3.8,
# so for 3.7 we need to build without build isolation and manually install numpy
- name: Install OMAS (Py 3.7, 3.8, 3.9)
if: ${{matrix.python-version == '3.7' || matrix.python-version == '3.8' || matrix.python-version == '3.9'}}
run: |
python3 -m pip install wheel
python3 -m pip install --no-build-isolation .[machine]
- name: Install OMAS (Py 3.6, 3.10, 3.11)
if: ${{matrix.python-version == '3.6' || matrix.python-version == '3.10' || matrix.python-version == '3.11' }}
run: |
python3 -m pip install .[machine]
- name: Move to root and try importing OMAS
run: |
cd /
python3 -c "import omas; print(omas.__version__)"
- name: Run OMAS tests
run: |
make test