remove q3c creation #872
Workflow file for this run
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 is a basic workflow to help you get started with Actions | |
name: CI | |
# Controls when the action will run. | |
on: | |
# Triggers the workflow on push or pull request events but only for the master branch | |
push: | |
pull_request: | |
merge_group: | |
# run the pipeline on the 0th minute of the 0th hour of day 1 and 15 every month | |
schedule: | |
- cron: '0 0 1,15 * *' | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
ci: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-22.04 | |
# Specify the python versions to test | |
strategy: | |
matrix: | |
python-version: ["3.10", "3.11"] | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v3 | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
auto-update-conda: true | |
python-version: ${{ matrix.python-version }} | |
- name: Install poetry | |
shell: bash -el {0} | |
run: conda install poetry | |
# Runs a set of commands using the runners shell | |
- name: set up ssh | |
uses: webfactory/[email protected] | |
with: | |
ssh-private-key: | | |
${{ secrets.WIRC_STARTERPACK_TOKEN }} | |
- name: install packages with conda | |
shell: bash -el {0} | |
run: | | |
conda install -c conda-forge astromatic-source-extractor astromatic-scamp astromatic-swarp astromatic-psfex astrometry gsl | |
swarp -v | |
scamp -v | |
sex -v | |
solve-field --version | |
pip install --upgrade pip | |
python -m pip install --upgrade poetry coveralls | |
poetry install | |
# Set up astrometry.net | |
- name: astrometry.net index files | |
run: | | |
curl -o /usr/share/miniconda/envs/test/data/index-5200-43.fits https://portal.nersc.gov/project/cosmo/temp/dstn/index-5200/LITE/index-5200-43.fits | |
curl -o /usr/share/miniconda/envs/test/data/index-5201-04.fits https://portal.nersc.gov/project/cosmo/temp/dstn/index-5200/LITE/index-5201-04.fits | |
curl -o /usr/share/miniconda/envs/test/data/index-5204-13.fits https://portal.nersc.gov/project/cosmo/temp/dstn/index-5200/LITE/index-5204-13.fits | |
curl -o /usr/share/miniconda/envs/test/data/index-5205-13.fits https://portal.nersc.gov/project/cosmo/temp/dstn/index-5200/LITE/index-5205-13.fits | |
# WINTER | |
curl -o /usr/share/miniconda/envs/test/data/index-5205-11.fits https://portal.nersc.gov/project/cosmo/temp/dstn/index-5200/LITE/index-5205-11.fits | |
curl -o /usr/share/miniconda/envs/test/data/index-5203-11.fits https://portal.nersc.gov/project/cosmo/temp/dstn/index-5200/LITE/index-5203-11.fits | |
curl -o /usr/share/miniconda/envs/test/data/index-5206-11.fits https://portal.nersc.gov/project/cosmo/temp/dstn/index-5200/LITE/index-5206-11.fits | |
curl -o /usr/share/miniconda/envs/test/data/index-5204-11.fits https://portal.nersc.gov/project/cosmo/temp/dstn/index-5200/LITE/index-5204-11.fits | |
# Set up database | |
- name: postgres | |
run: | | |
sudo apt-get update | |
sudo apt-get install postgresql | |
sudo apt-get install postgresql-common | |
sudo apt-get install postgresql-server-dev-14 | |
sudo service postgresql restart | |
sudo -u postgres psql -c "create user runner; grant all privileges on database postgres to runner; ALTER USER runner WITH SUPERUSER;" | |
git clone https://github.com/segasai/q3c.git | |
make -C q3c | |
sudo make -C q3c install | |
# First make sure the doc tests are up to date | |
- name: Run doc tests | |
shell: bash -el {0} | |
run: | | |
poetry run make -C docs/ doctest | |
# Runs a set of commands using the runners shell | |
- name: Test the code | |
shell: bash -el {0} | |
env: | |
OUTPUT_DATA_DIR : /home/runner/ | |
PG_ADMIN_USER: runner | |
PG_ADMIN_PWD: "" | |
DB_USER: runner | |
DB_PWD: "" | |
WATCHDOG_EMAIL: ${{ secrets.WATCHDOG_EMAIL }} | |
WATCHDOG_EMAIL_PASSWORD: ${{ secrets.WATCHDOG_EMAIL_PASSWORD }} | |
WATCHDOG_EMAIL_RECIPIENTS: ${{ secrets.WATCHDOG_EMAIL_RECIPIENTS }} | |
KOWALSKI_TOKEN: ${{ secrets.KOWALSKI_TOKEN }} | |
FRITZ_TOKEN: ${{ secrets.FRITZ_TOKEN }} | |
run: | | |
TESTDATA_CHECK="True" poetry run coverage run -m unittest discover tests/ | |
- name: Run Coveralls | |
if: ${{ success() }} | |
shell: bash -el {0} | |
run: | | |
poetry run coveralls --service=github | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Echo tag name | |
run: echo "Tag is ${{ github.ref }}, Tagged is ${{ startsWith(github.ref, 'refs/tags/')}}, Python Check is ${{matrix.python-version == 3.11}}, Deploy is ${{ startsWith(github.ref, 'refs/tags/') && matrix.python-version == 3.11}}" | |
# Build a tarball and push to Pypi if tagged with new version | |
- name: Build and publish | |
shell: bash -el {0} | |
env: | |
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_API_TOKEN }} | |
# Only run if secrets.PYPI_API_TOKEN exists. | |
if: ${{ startsWith(github.ref, 'refs/tags/') && success() && matrix.python-version == 3.11 && env.POETRY_PYPI_TOKEN_PYPI != ''}} | |
run: | | |
poetry publish -n --build |