forked from deepmodeling/deepmd-kit
-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (58 loc) · 1.57 KB
/
test_python.yml
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
57
58
59
on:
push:
pull_request:
name: Test Python
jobs:
testpython:
name: Test Python
runs-on: ubuntu-latest
strategy:
matrix:
include:
- python: 3.7
gcc: 5
tf: 1.14
- python: 3.7
gcc: 6
tf: 1.14
- python: 3.7
gcc: 7
tf: 1.14
- python: 3.7
gcc: 8
tf: 1.14
- python: 3.8
gcc: 8
tf:
- python: "3.11"
gcc: 8
tf:
container: ghcr.io/deepmodeling/deepmd-kit-test-environment:py${{ matrix.python }}-gcc${{ matrix.gcc }}-tf${{ matrix.tf }}
steps:
- name: work around permission issue
run: git config --global --add safe.directory /__w/deepmd-kit/deepmd-kit
- uses: actions/checkout@v3
# https://github.com/pypa/pip/issues/11770
- run: python -m pip install -U "pip>=21.3.1,!=23.0.0"
- run: pip install -e .[cpu,test]
env:
CC: gcc-${{ matrix.gcc }}
CXX: g++-${{ matrix.gcc }}
TENSORFLOW_VERSION: ${{ matrix.tf }}
DP_BUILD_TESTING: 1
- run: dp --version
- run: pytest --cov=deepmd --cov=deepmd_cli source/tests --durations=0
- uses: codecov/codecov-action@v3
with:
gcov: true
gcov_executable: gcov-${{ matrix.gcc }}
pass:
name: Pass testing Python
needs: [testpython]
runs-on: ubuntu-latest
if: always()
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}