Skip to content

add deepwiki badge

add deepwiki badge #5

Workflow file for this run

name: Test Python
on:
push:
branches-ignore:
- gh_pages
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Free Disk Space for Python
uses: endersonmenezes/free-disk-space@v3
with:
remove_android: true
remove_dotnet: true
remove_folders: "/usr/share/swift /usr/local/julia"
rm_cmd: "rmz" # NEW: Faster deletion
rmz_version: "3.1.1" # NEW: Specify rmz version
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install deepmd-kit[gpu,cu12,torch]==3.1.1
pip install .[test,torch_admp] # Install package with test dependencies
- name: Test with pytest
run: |
pytest --cov=ec_mlp tests --junitxml=junit.xml --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: ${{ github.repository }}
files: ./coverage.xml
report_type: coverage
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: ${{ github.repository }}
files: ./junit.xml
report_type: test_results