Skip to content

pip to uv CI migration #67

pip to uv CI migration

pip to uv CI migration #67

Workflow file for this run

name: Testing
on:
push:
branches: [master]
paths-ignore: [docs/**]
pull_request:
branches: [master]
paths-ignore: [docs/**]
workflow_dispatch:
# make this workflow reusable by release.yml
workflow_call:
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-14]
# not testing on 3.9 because tests use glob("*", root_dir=TEST_FILES)
# and root_dir only added in 3.10
python-version: ["3.10", "3.12"]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: pyproject.toml
- name: Install uv
run: pip install uv
- name: Install openbabel
run: |
if [ "${{ matrix.os }}" == "ubuntu-latest" ]; then
sudo apt-get update
sudo apt-get install -y openbabel
elif [ "${{ matrix.os }}" == "macos-14" ]; then
brew install open-babel
elif [ "${{ matrix.os }}" == "windows-latest" ]; then
choco install openbabel
fi
- name: Install dependencies
run: |
uv pip install -e '.[dev]' --system
uv pip install openbabel --system
# check if openbabel is installed
python -c "import openbabel"
- name: pytest
env:
PMG_MAPI_KEY: ${{ secrets.PMG_MAPI_KEY }}
MPLBACKEND: "Agg"
run: pytest --cov=custodian --color=yes tests
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}