Skip to content

JAX bindings to Uniform 1d JIT #54

JAX bindings to Uniform 1d JIT

JAX bindings to Uniform 1d JIT #54

Workflow file for this run

name: Coverage on PR
on:
pull_request:
branches: [ "main", "release" ]
jobs:
cuequivariance:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade uv
python -m uv pip install pytest pytest-cov
python -m uv pip install ./cuequivariance
- name: Run coverage
run: |
pytest --cov=cuequivariance cuequivariance > coverage.txt
coverage_pr=$(cat coverage.txt | grep TOTAL | awk '{print $4}' | sed 's/%//')
echo "Coverage on PR branch: $coverage_pr"
git fetch origin ${{ github.event.pull_request.base.ref }}:${{ github.event.pull_request.base.ref }}
git checkout ${{ github.event.pull_request.base.ref }}
pytest --cov=cuequivariance cuequivariance > coverage.txt
coverage_target=$(cat coverage.txt | grep TOTAL | awk '{print $4}' | sed 's/%//')
echo "Coverage on target branch: $coverage_target"
if [ $coverage_pr -lt $coverage_target ]; then
echo "Coverage on PR branch is lower than on target branch"
echo "Coverage on PR branch: $coverage_pr"
echo "Coverage on target branch: $coverage_target"
exit 1
fi