add example run file #116
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: continuous-integration | |
on: | |
push: | |
branches: | |
- main | |
- releases/* | |
pull_request: null | |
env: | |
CACHE_NUMBER: 0 # increase to reset cache manually | |
CONDA_ENV: .github/environment.yml | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout SOOPERCOOL repository | |
uses: actions/checkout@v3 | |
- name: Install python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- uses: awvwgk/setup-fortran@main | |
id: setup-fortran | |
with: | |
compiler: gcc | |
version: 11 | |
- run: ${{ env.FC }} --version | |
env: | |
FC: ${{ steps.setup-fortran.outputs.fc }} | |
- name: Install dependencies | |
run: | | |
sudo -H apt-get install libgsl-dev libfftw3-dev libcfitsio-dev | |
- name: Install soopercool & dependencies | |
run: | | |
python -m pip install -U pip | |
pip install -U wheel | |
pip install -U setuptools | |
pip install -U numpy | |
pip install -U scipy | |
pip install -U healpy | |
pip install -U sacc | |
pip install -U camb | |
pip install -U pymaster | |
pip install -U flake8 | |
pip install -U pytest | |
pip install -U pytest-cov | |
pip install -U coveralls | |
python setup.py install | |
- name: Lint | |
uses: py-actions/flake8@v2 | |
with: | |
args: "--config .flake8" | |
- name: Tests | |
run: pytest -vv --cov=soopercool | |