Skip to content

GOATS-714: Move changelog to inside documentation. (#321) #752

GOATS-714: Move changelog to inside documentation. (#321)

GOATS-714: Move changelog to inside documentation. (#321) #752

Workflow file for this run

name: Run Tests
on:
pull_request:
paths:
- "src/**/*.py"
- "tests/unit/**/*.py"
- "pyproject.toml"
- "uv.lock"
push:
branches:
- main
jobs:
run_tests:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.12"]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: goats
- name: Setup Miniforge
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
miniforge-version: latest
activate-environment: goats-env
channels: conda-forge, http://astroconda.gemini.edu/public
channel-priority: strict
auto-activate-base: false
conda-remove-defaults: "true"
- name: Get date
id: get-date
run: echo "today=$(/bin/date -u '+%Y%m%d')" >> $GITHUB_OUTPUT
shell: bash
- name: Cache conda env
uses: actions/cache@v4
with:
path: ${{ env.CONDA }}/envs
key: conda-${{ runner.os }}--${{ runner.arch }}--${{
steps.get-date.outputs.today }}-${{
hashFiles('goats/ci_environment.yaml', 'goats/pyproject.toml') }}-${{
env.CACHE_NUMBER }}
env:
# Increase this value to reset cache if goats/ci_environment.yaml has not changed.
CACHE_NUMBER: 0
id: cache
- name: Update environment
run: |
conda env update -n goats-env -f goats/ci_environment.yaml
cd goats
uv pip install -v -e . --group dev
if: steps.cache.outputs.cache-hit != 'true'
- name: Run tests and calculate coverage
run: |
cd goats
pytest -r A -v -n auto --cov=src --cov-report=xml --cov=tests --cov-branch
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}