DM-47143: Enable entry points for comand-line plugin discovery #184
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: build_and_test | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
build_and_test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
# Need to clone everything for the git tags. | |
fetch-depth: 0 | |
- uses: conda-incubator/setup-miniconda@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
channels: conda-forge,defaults | |
channel-priority: strict | |
show-channel-urls: true | |
- name: Install postgres for testing | |
shell: bash -l {0} | |
run: | | |
conda install postgresql psycopg2 | |
- name: Update pip/wheel infrastructure | |
shell: bash -l {0} | |
run: | | |
conda install -y -q pip wheel | |
pip install uv | |
- name: Install dependencies | |
shell: bash -l {0} | |
run: | | |
uv pip install -r requirements.txt | |
uv pip install testing.postgresql | |
# We have two cores so we can speed up the testing with xdist | |
- name: Install pytest packages | |
shell: bash -l {0} | |
run: | | |
uv pip install \ | |
pytest pytest-xdist pytest-cov | |
- name: List installed packages | |
shell: bash -l {0} | |
run: | | |
conda list | |
pip list -v | |
- name: Build and install | |
shell: bash -l {0} | |
run: | | |
uv pip install -v --no-deps -e . | |
- name: Run tests | |
shell: bash -l {0} | |
env: | |
DAF_BUTLER_MIGRATE_DIR: . | |
DAF_BUTLER_MIGRATE_MIGRATIONS: ./migrations | |
run: | | |
pytest -r a -v -n 3 --cov=lsst.daf.butler_migrate --cov=tests --cov-report=xml --cov-report=term --cov-branch | |
butler migrate -h | |
- name: Upload coverage to codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
files: ./coverage.xml | |
token: ${{ secrets.CODECOV_TOKEN }} |