From b2ac8de229c44127219bd60f0d7953e154ea95f7 Mon Sep 17 00:00:00 2001 From: Tim Jenness Date: Fri, 25 Mar 2022 09:37:37 -0700 Subject: [PATCH] Add a build git action --- .github/workflows/build.yaml | 44 ++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/build.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 000000000..0fb7ab4e2 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,44 @@ +name: build_and_test + +on: + push: + branches: + - main + - lsst-dev + - master + pull_request: + +jobs: + build_and_test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - uses: conda-incubator/setup-miniconda@v2 + with: + python-version: 3.8 + channels: conda-forge,defaults + channel-priority: strict + show-channel-urls: true + + - name: Install dependencies + # Might be quicker to install rubin-env plus any necessary additions. + shell: bash -l {0} + run: | + conda install -y -q numpy scipy matplotlib pandas llvmlite numba astropy photutils astroquery coloredlogs scikit-image h5py emcee tqdm schwimmbad iminuit coverage configparser coveralls pysynphot deprecated pyyaml nose + + - name: List installed packages + shell: bash -l {0} + run: | + conda list + pip list -v + + - name: Build and install + shell: bash -l {0} + run: | + pip install -v -e . + + - name: Run tests + shell: bash -l {0} + run: | + python setup.py nosetests