-
Notifications
You must be signed in to change notification settings - Fork 2
56 lines (47 loc) · 1.51 KB
/
Copy pathtest_python.yml
File metadata and controls
56 lines (47 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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