Fixes to issue #48 #153
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: CI Tests | |
on: | |
push: | |
branches: | |
- "main" | |
tags: | |
- "*" | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -l {0} | |
strategy: | |
fail-fast: false | |
max-parallel: 5 | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Conda environment with Micromamba | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
environment-file: environment.yml | |
cache-env: true | |
cache-env-key: env-envkey-${{ github.sha }}-${{ github.run_attempt }} | |
environment-name: neost | |
- name: mamba installs | |
run: | | |
micromamba install flake8 pytest | |
- name: install gsl | |
run: | | |
sudo apt-get install -y libgsl-dev | |
- name: Lint with flake8 | |
run: | | |
# stop the build if there are Python syntax errors or undefined names | |
#flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | |
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | |
- name: install neost package | |
run: | | |
pip install . | |
shell: bash -l {0} | |
- name: Test with pytest | |
run: | | |
pytest | |
tests-mac: | |
runs-on: macos-latest | |
defaults: | |
run: | |
shell: bash -l {0} | |
strategy: | |
fail-fast: false | |
max-parallel: 5 | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Conda environment with Micromamba | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
environment-file: environment_mac.yml | |
cache-env: true | |
cache-env-key: env-envkey-${{ github.sha }}-${{ github.run_attempt }} | |
environment-name: neost | |
- name: pymultinest & Cython install and neost activation | |
run: | | |
micromamba activate neost | |
pip install cython | |
pip install pymultinest | |
- name: mamba installs | |
run: | | |
brew install flake8 pytest | |
- name: Python version check | |
run: | | |
echo $PATH | |
python --version | |
which python | |
shell: bash -l {0} | |
- name: install gsl | |
run: | | |
brew install gsl | |
- name: Lint with flake8 | |
run: | | |
# stop the build if there are Python syntax errors or undefined names | |
#flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | |
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | |
- name: install neost package | |
run: | | |
pip install . | |
shell: bash -l {0} | |
- name: Test with pytest | |
run: | | |
python -m pytest |