Skip to content

Dev

Dev #530

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@v5
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 .
pip show ${{ env.PROJECT_NAME }}
shell: bash
- name: Test with pytest
run: |
pytest -vvv --cov=${{ env.PROJECT_NAME }} --cov-report=xml --cov-report=term tests/
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v4