Photometry V3: Back do SEP #38
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
name: CI | |
on: | |
push: | |
branches: | |
- main | |
- 'v*' | |
tags: | |
- '*' | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
tests: | |
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1 | |
if: "!(contains(github.event.head_commit.message, '[skip ci]') || contains(github.event.head_commit.message, '[ci skip]'))" | |
with: | |
cache-path: ~/.astropy | |
envs: | | |
- linux: py38-test-online | |
cache-key: ${{ github.ref }}-py38lin-astropycache | |
- linux: py39-test-online | |
cache-key: ${{ github.ref }}-py39lin-astropycache | |
- linux: py310-test-online | |
cache-key: ${{ github.ref }}-py310lin-astropycache | |
- linux: py311-test-online | |
cache-key: ${{ github.ref }}-py311lin-astropycache | |
- linux: py312-test-online | |
cache-key: ${{ github.ref }}-py312lin-astropycache | |
- linux: py311-test-np1 | |
cache-key: ${{ github.ref }}-py311np1-astropycache | |
build_docs: | |
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1 | |
if: "!(contains(github.event.head_commit.message, '[skip ci]') || contains(github.event.head_commit.message, '[ci skip]'))" | |
with: | |
cache-path: .tox | |
cache-key: build_docs-astropy | |
libraries: | | |
apt: | |
- pandoc | |
- graphviz | |
envs: | | |
- linux: build_docs | |
coverage: | |
name: "Conda/Coverage/Astrometry.net" | |
runs-on: ubuntu-latest | |
if: "!(contains(github.event.head_commit.message, '[skip ci]') || contains(github.event.head_commit.message, '[ci skip]'))" | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Get Date | |
id: get-date | |
run: echo "today=$(/bin/date -u '+%Y%m%d')" >> $GITHUB_OUTPUT | |
shell: bash | |
- name: Cache conda | |
uses: actions/cache@v3 | |
with: | |
path: ~/conda_pkgs_dir | |
key: | |
${{ runner.os }}-${{ runner.arch }}-conda-${{ hashFiles('pyproject.toml') }} | |
- name: Cache env | |
uses: actions/cache@v3 | |
with: | |
path: ${{ env.CONDA }}/envs | |
key: | |
${{ github.ref }}-${{ runner.os }}-${{ runner.arch }}-${{ steps.get-date.outputs.today }}-conda-envs-${{ hashFiles('pyproject.toml') }} | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
miniforge-variant: Mambaforge | |
miniforge-version: latest | |
activate-environment: astropop | |
use-mamba: true | |
mamba-version: "*" | |
channels: conda-forge,defaults | |
python-version: "3.12" | |
- name: Cache astropy cache | |
uses: actions/cache@v3 | |
with: | |
path: ~/.astropy | |
# setup.cfg and pyproject.toml have versioning info that would | |
# impact the tox environment. | |
key: ${{ github.ref }}-conda-astropy | |
- name: Install dependencies | |
shell: bash -l {0} | |
run: | | |
mamba install -y -q pytest astrometry \ | |
astropy scipy numpy matplotlib \ | |
scikit-image scikit-learn \ | |
sep astroquery | |
pip install astroscrappy | |
pip install coveralls .[test] | |
- name: Install astropop | |
shell: bash -l {0} | |
run: pip install -U .[all] | |
- name: Print versions | |
shell: bash -l {0} | |
run: | | |
conda info | |
conda list | |
- name: Run Pytest and generate coverage | |
shell: bash -l {0} | |
run: | | |
pytest --pyargs ./tests ./docs --remote-data --cov astropop --cov-config=./pyproject.toml | |
coverage xml -o ./coverage.xml | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
file: ./coverage.xml | |
token: ${{ secrets.CODECOV_TOKEN }} | |
- name: Upload coverage to Coveralls | |
shell: bash -l {0} | |
if: github.event_name != 'pull_request' | |
env: | |
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: coveralls |