Skip to content

Use (beta) IRAF installer package on macOS #652

Use (beta) IRAF installer package on macOS

Use (beta) IRAF installer package on macOS #652

Workflow file for this run

name: PyRAF CI test
on: [push]
jobs:
tests:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
env:
tmp: /tmp/
iraf: ${{ matrix.iraf }}
TERM: dumb
PYRAF_NO_DISPLAY: no
strategy:
matrix:
include:
- name: Ubuntu 22.04 (Python-3.10), native
os: ubuntu-22.04
method: native
iraf: /usr/lib/iraf/
upload_coverage: yes
- name: Ubuntu 22.04 (Python-3.10), native, without IRAF
os: ubuntu-22.04
method: native
- name: Ubuntu 20.04 (Python-3.8.2), pip
os: ubuntu-20.04
method: pip
iraf: /usr/lib/iraf/
- name: macOS 13, pip
os: macos-13
method: pip
iraf: /usr/local/lib/iraf/
irafpkg: https://github.com/iraf-community/iraf-mac-build/releases/download/v2.17.1-beta/iraf-2.17.1-beta-x86_64.pkg
steps:
- name: Checkout repository
if: matrix.method == 'native'
uses: actions/checkout@v2
- name: Setup dependencies
if: startsWith(matrix.os, 'ubuntu') && matrix.method == 'native'
run: |
sudo apt-get update
if [ "$iraf" ]; then
sudo apt-get install --no-install-recommends iraf iraf-noao iraf-dev
else
echo "PYRAF_NO_IRAF=yes" >> $GITHUB_ENV
fi
sudo apt-get install --no-install-recommends build-essential libx11-dev
sudo apt-get install --no-install-recommends python3-dev python3-pip python3-astropy python3-numpy-dev python3-setuptools python3-setuptools-scm python3-tk python3-pytest python3-pytest-cov ipython3
pip3 install "stsci.tools>=4.0.1" coveragepy
- name: Setup dependencies
if: startsWith(matrix.os, 'ubuntu') && matrix.method == 'pip'
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends iraf iraf-noao iraf-dev build-essential libx11-dev
sudo apt-get install --no-install-recommends python3-dev python3-pip
pip3 install ipython
- name: Setup dependencies, Mac
if: startsWith(matrix.os, 'macos') && matrix.method == 'pip'
run: |
wget ${{ matrix.irafpkg }}
sudo installer -pkg iraf-*.pkg -target /
- name: Build PyRAF locally
if: matrix.method == 'native'
run: |
python3 setup.py build_ext -i
- name: Install PyRAF via pip
if: matrix.method == 'pip'
run: |
pip3 install git+$GITHUB_SERVER_URL/$GITHUB_REPOSITORY@$GITHUB_SHA#egg=pyraf[test]
- name: Run tests (locally built)
if: matrix.method == 'native'
run: |
python3 -m pytest --cov=pyraf
- name: Run tests (installed package)
if: matrix.method == 'pip'
run: |
python3 -m pytest -s --pyargs pyraf
- name: "Upload coverage to Codecov"
if: matrix.upload_coverage == 'yes'
uses: codecov/codecov-action@v1
with:
fail_ci_if_error: false