@@ -10,28 +10,20 @@ jobs:
10
10
test :
11
11
if : github.repository_owner == 'hackingmaterials' # don't run on forks
12
12
runs-on : ubuntu-latest
13
- strategy :
14
- matrix :
15
- # pytest-split groups for automatically equally split concurrent test runners
16
- group : [1, 2, 3, 4, 5]
17
13
services :
18
14
mongodb :
19
15
image : mongo
20
16
ports :
21
17
- 27017:27017
22
18
23
19
steps :
24
- - name : Check out repo
25
- uses : actions/checkout@v3
20
+ - name : Checkout repo
21
+ uses : actions/checkout@v2
26
22
27
- - name : Set up python
28
- uses : actions/setup-python@v3
23
+ - name : Setup Python
24
+ uses : actions/setup-python@v2
29
25
with :
30
26
python-version : 3.8
31
- cache : pip
32
- cache-dependency-path : |
33
- setup.py
34
- requirements-ci.txt
35
27
36
28
- name : Install OpenBabel
37
29
run : |
@@ -40,54 +32,19 @@ jobs:
40
32
# https://github.com/openbabel/openbabel/issues/2408#issuecomment-1014466193
41
33
sudo ln -s /usr/include/openbabel3 /usr/local/include/openbabel3
42
34
43
- - name : Install dependencies
44
- run : |
45
- pip install -r requirements-ci.txt
46
- pip install .[complete]
47
-
48
- - name : Get durations from cache
35
+ - name : Cache pip
49
36
uses : actions/cache@v2
50
37
with :
51
- path : test_durations
52
- # the key must never match, even when restarting workflows, as that
53
- # will cause durations to get out of sync between groups, the
54
- # combined durations will be loaded if available
55
- key : test-durations-split-${{ github.run_id }}-${{ github.run_number}}-${{ matrix.group }}
38
+ path : ~/.cache/pip
39
+ key : ${{ runner.os }}-pip-${{ hashFiles('requirements-ci.txt', 'setup.py') }}
56
40
restore-keys : |
57
- test-durations-combined-${{ github.sha }}
58
- test-durations-combined
41
+ ${{ runner.os }}-pip-
59
42
60
- - name : Run tests
43
+ - name : Install dependencies
61
44
run : |
62
- pytest --splits 5 --group ${{ matrix.group }} --store-durations \
63
- --cov=atomate --cov-report html:coverage_reports atomate
64
-
65
- - name : Upload partial durations
66
- uses : actions/upload-artifact@v2
67
- with :
68
- name : split-${{ matrix.group }}
69
- path : .test_durations
70
-
71
- update_durations :
72
- name : Combine and update test durations
73
- runs-on : ubuntu-latest
74
- needs : test
75
- steps :
76
- - name : Check out repo
77
- uses : actions/checkout@v2
78
-
79
- - name : Get durations from cache
80
- uses : actions/cache@v2
81
- with :
82
- path : .test_durations
83
- # key won't match during the first run for the given commit, but
84
- # restore-key will if there's a previous stored durations file,
85
- # so cache will both be loaded and stored
86
- key : test-durations-combined-${{ github.sha }}
87
- restore-keys : test-durations-combined
88
-
89
- - name : Download artifacts
90
- uses : actions/download-artifact@v2
45
+ pip install -r requirements-ci.txt
46
+ pip install .[complete]
91
47
92
- - name : Combine test durations
93
- run : python3 .github/workflows/combine_durations.py
48
+ - name : pytest
49
+ run : |
50
+ pytest --ignore=atomate/qchem/test_files --cov=atomate --cov-report html:coverage_reports atomate
0 commit comments