Skip to content

Commit 1d1cbec

Browse files
authored
Add test workflow and a simple test example.
Add test workflow and a simple test example.
2 parents 890db7b + edc0181 commit 1d1cbec

12 files changed

Lines changed: 121 additions & 4 deletions

File tree

.github/workflows/test.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Integration Test and Unit Test
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- develop
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
test:
17+
name: PyTest
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout Github
21+
uses: actions/checkout@v4
22+
- name: Set up Python
23+
uses: actions/setup-python@v5
24+
with:
25+
python-version: 3.12
26+
- name: Install dependencies
27+
run: |
28+
python -m pip install --upgrade pip
29+
pip install -r requirements.txt
30+
pip install -e .
31+
32+
# - name: Unit Test with PyTest
33+
# run: |
34+
# pytest tests/unittests/ -s
35+
36+
- name: Integration Test withs PyTest
37+
env:
38+
ROOT_DIR: ${{ github.workspace }}
39+
run: |
40+
pytest tests/integral/
41+
42+
- name: Archive Pytest test report
43+
uses: actions/upload-artifact@v4
44+
with:
45+
name: SuperTest-test-report
46+
path: report
47+
48+
- name: Upload Pytest report to GitHub
49+
uses: actions/upload-artifact@v4
50+
with:
51+
name: Pytest-test-report
52+
path: report

requirements.txt

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1-
numpy
1+
numpy==1.26.0
2+
scipy
3+
h5py
24
paramiko
3-
ruamel.yaml
5+
ruamel.yaml==0.17.21
46
torch
5-
pyscf
6-
dpdispatcher
7+
mpich
8+
abacus
9+
pytest
10+
psutil
11+
# pyscf
12+
# dpdispatcher
320 Bytes
Binary file not shown.
131 Bytes
Binary file not shown.
6.45 KB
Binary file not shown.
152 Bytes
Binary file not shown.
152 Bytes
Binary file not shown.
152 Bytes
Binary file not shown.
264 KB
Binary file not shown.
152 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)