add addNoise task #94
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
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
name: tests | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.11"] | |
steps: | |
- name: Install system dependencies | |
shell: bash -l {0} | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y build-essential | |
sudo apt-get install -y fftw3-dev | |
- name: Git checkout currect repo | |
uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
channels: conda-forge | |
channel-priority: strict | |
show-channel-urls: true | |
- name: Install dependencies | |
shell: bash -l {0} | |
run: | | |
conda config --set always_yes yes | |
conda install --file requirements.txt -c conda-forge | |
conda install --file requirements_test.txt -c conda-forge | |
python -m pip install --upgrade pip | |
pip install -U setuptools | |
pip install . --user | |
- name: Lint with black | |
shell: bash -l {0} | |
run: | | |
black . | |
- name: Test with pytest | |
shell: bash -l {0} | |
run: | | |
wget https://www.cosmo.bnl.gov/www/esheldon/data/catsim.tar.gz | |
tar xvfz catsim.tar.gz | |
export CATSIM_DIR=$(realpath catsim) | |
pytest |