Skip to content

Add CI run with uv install --resolution=lowest #556

Add CI run with uv install --resolution=lowest

Add CI run with uv install --resolution=lowest #556

Workflow file for this run

name: Tests
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
workflow_call:
jobs:
tests:
strategy:
fail-fast: true
matrix:
config:
- { os: ubuntu-latest, python: "3.9", resolution: highest }
- { os: macos-latest, python: "3.10", resolution: lowest }
- { os: windows-latest, python: "3.12", resolution: lowest-direct }
runs-on: ${{ matrix.config.os }}
steps:
- name: Check out repo
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.config.python }}
cache: pip
cache-dependency-path: pyproject.toml
- name: Install uv
run: pip install uv
- name: Install dependencies
run: |
uv pip install cython setuptools --system
python setup.py build_ext --inplace
uv pip install -e .[test] --system --resolution=${{ matrix.config.resolution }}
- name: Run Tests
run: pytest --capture=no --cov --cov-report=xml
env:
CHGNET_DEVICE: cpu
- name: Codacy coverage reporter
if: ${{ matrix.config.os == 'ubuntu-latest' && github.event_name == 'push' }}
uses: codacy/codacy-coverage-reporter-action@v1
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: coverage.xml