name: Python Test on: push: branches: [main] pull_request: branches: [main] env: UV_SYSTEM_PYTHON: 1 jobs: test: runs-on: ubuntu-latest strategy: # max-parallel: 2 matrix: python-version: ["3.10", "3.11"] steps: - name: Checkout repository uses: actions/checkout@v4 - name: Install uv uses: astral-sh/setup-uv@v4 with: enable-cahce: true cache-dependency-glob: "pyproject.toml" - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} python-version-file: "pyproject.toml" cache: 'pip' - name: Install dependencies run: | TORCH=2.2 CUDA=cu121 uv pip install torch==${TORCH}.0 uv pip install torch-scatter -f https://data.pyg.org/whl/torch-${TORCH}.0+${CUDA}.html uv pip install torch-sparse -f https://data.pyg.org/whl/torch-${TORCH}.0+${CUDA}.html uv pip install dgl -f https://data.dgl.ai/wheels/torch-${TORCH}/${CUDA}/repo.html uv pip install -e .[test] uv pip install -e .[mace] uv pip install -e .[deepmd] - name: List dependencies run: pip list - name: Login huggingface # if: ${{ github.event.pull_request.head.repo.full_name == github.repository }} env: HF_TOKEN: ${{ secrets.HF_TOKEN_READ_ONLY }} run: huggingface-cli login --token $HF_TOKEN - name: Run tests env: PREFECT_API_KEY: ${{ secrets.PREFECT_API_KEY }} PREFECT_API_URL: ${{ secrets.PREFECT_API_URL }} run: | pytest -v tests