Skip to content

Release 1.7.1

Release 1.7.1 #1237

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Test
on:
push:
branches: [ main ]
paths-ignore:
- 'docs/**'
pull_request:
branches: [ main ]
paths-ignore:
- 'docs/**'
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.11', '3.12']
env:
WOKCALIB_DIR: '/home/runner/work/jaeger/jaeger/fps_calibrations/apo/wok_calibs/sloanFlatCMM'
PYTHONPATH: '/home/runner/work/jaeger/jaeger/fps_calibrations'
OBSERVATORY: 'APO'
RS_VERSION: 'eta-6'
steps:
- uses: actions/checkout@v4
- name: Checkout fps_calibrations
uses: actions/checkout@v4
with:
repository: sdss/fps_calibrations
path: fps_calibrations
ref: '2024.04.01'
- name: Restore large test files files
id: cache-fcam
uses: actions/cache@v4
with:
path: /home/runner/work/jaeger/jaeger/tests/data/fcam
key: ${{ runner.os }}-tests-fcam
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install Postgresql
uses: ikalnytskyi/action-setup-postgres@v5
with:
username: sdss
id: postgres
- name: Install Q3C
run: |
sudo apt-get update
sudo apt-get install -y postgresql-server-dev-14
wget https://github.com/segasai/q3c/archive/refs/tags/v2.0.1.tar.gz
tar xvf v2.0.1.tar.gz
cd q3c-2.0.1
make
sudo make install
env:
PGSERVICE: ${{ steps.postgres.outputs.service-name }}
- name: Create database
run: |
createdb sdss5db_jaeger_test
psql -c "CREATE EXTENSION q3c;" -d sdss5db_jaeger_test
env:
PGSERVICE: ${{ steps.postgres.outputs.service-name }}
- name: Populate database
run: |
cd tests/data/sdss5db/targetdb
psql sdss5db_jaeger_test < targetdb.sql
psql sdss5db_jaeger_test < restore_sample_files.sql
cd ../opsdb_apo
psql sdss5db_jaeger_test < opsdb_apo.sql
env:
PGSERVICE: ${{ steps.postgres.outputs.service-name }}
- name: Install dependencies
run: |
pip install --upgrade wheel pip setuptools
pip install .
- name: Test with pytest
run: |
python -m pip install pytest pytest-mock pytest-asyncio pytest-cov pyserial-asyncio
pytest
env:
PGSERVICE: ${{ steps.postgres.outputs.service-name }}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml