refactor(build): change setup.py to pyproject.toml and supress cython warning #614
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.7' | |
- name: git version | |
run: git --version | |
- name: Install hdf5 & netcdf | |
run: | | |
sudo apt-get update | |
sudo apt-get install libhdf5-dev libnetcdf-dev | |
- name: Build & Install OMAS | |
run: | | |
python3 -m pip install build | |
python3 -m build --sdist | |
# TODO do not hard code version here | |
python3 -m pip install "./dist/omas-0.93.0.tar.gz[machine]" | |
- name: Move to root and try importing OMAS | |
run: | | |
cd / | |
python3 -c "import omas; print(omas.__version__)" | |
- name: Run OMAS tests | |
run: | | |
# TODO the tests pickup omas from the python files in the directory not the installed version | |
# so to make that work we run an editable install to create the omas_cython lib in the right place. | |
python3 -m pip install -e | |
make test |