Skip to content

Merge pull request #11 from lsst/tickets/DM-48935 #205

Merge pull request #11 from lsst/tickets/DM-48935

Merge pull request #11 from lsst/tickets/DM-48935 #205

Workflow file for this run

name: build_and_test
on:
push:
branches:
- main
tags:
- "*"
pull_request:
jobs:
build_and_test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
with:
# Need to clone everything for the git tags.
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: "setup.cfg"
- name: Install yaml
run: sudo apt-get install libyaml-dev
- name: Install prereqs for setuptools
run: pip install wheel uv
# We have two cores so we can speed up the testing with xdist
- name: Install xdist and cov for pytest
run:
uv pip install --system pytest-xdist pytest-cov
- name: Build and install
run: uv pip install --system -v -e .[plotting]
- name: Install documenteer for doctest
run: uv pip install --system 'documenteer[pipelines]<0.7'
- name: Run tests
run: >
pytest -r a -v -n 3 --cov=tests --cov=lsst.scarlet.lite
--cov-report=xml --cov-report=term
--doctest-modules --doctest-glob="*.rst"
--junitxml=junit.xml -o junit_family=legacy
- name: Upload coverage to codecov
uses: codecov/codecov-action@v4
with:
files: ./coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}