Skip to content

Devbugs

Devbugs #775

Workflow file for this run

name: Code Coverage
on:
push:
branches:
- main
pull_request:
branches:
- main
- dev
workflow_dispatch:
env:
FORCE_COLOR: 3
PROJECT_NAME: "astrophot"
jobs:
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: "3.10"
- name: Record State
run: |
pwd
echo github.ref is: ${{ github.ref }}
echo GITHUB_SHA is: $GITHUB_SHA
echo github.event_name is: ${{ github.event_name }}
echo github workspace: ${{ github.workspace }}
pip --version
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest
pip install pytest-cov
pip install wheel
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
shell: bash
- name: Install error reporter
run: |
python -m pip install pytest-github-actions-annotate-failures
- name: Install AstroPhot
run: |
pip install -e ".[dev]"
pip show ${{ env.PROJECT_NAME }}
shell: bash
- name: Test with pytest [torch]
run: |
coverage run --source=${{ env.PROJECT_NAME }} -m pytest tests/
shell: bash
env:
CASKADE_BACKEND: torch
- name: Extra coverage report for jax checks
run: |
echo "Running extra coverage report for jax checks"
coverage run --append --source=${{ env.PROJECT_NAME }} -m pytest tests/
shell: bash
env:
JAX_ENABLE_X64: True
CASKADE_BACKEND: jax
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: ./coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: true