Skip to content

Update python-package.yml #52

Update python-package.yml

Update python-package.yml #52

# This GitHub Actions workflow will install Python dependencies and run tests for PyImfit
# with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: PyImfit CI
on:
push:
branches: [ master ]
# pull_request:
# branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
# use quotes to avoid YAML processor interpreting version numbers as *numbers*
# and e.g. trying to turn 3.10 into 3.1
python-version: ['3.7', '3.8', '3.9', '3.10']
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip==23.0.1
python -m pip install flake8 astropy pytest scons
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Build and test import of package
run: |
pip install -e . ; python -c "import pyimfit"
- name: Test with pytest
run: |
cd pyimfit/tests ; pytest