@@ -118,21 +118,21 @@ jobs:
118
118
python -m pip install numpy cython packaging
119
119
python -m pip install -e '.[dev,optional]'
120
120
- name : pytest split ${{ matrix.split }}
121
- if : github.event_name == 'release'
121
+ if : github.event_name == 'release' || github.event_name == 'push'
122
122
# For releases, we do non-parallel runs, which usually makes sure that the coverage is properly completed.
123
123
run : |
124
124
pytest --cov=pymatgen tests
125
125
- name : pytest split ${{ matrix.split }}
126
- if : github.event_name != 'release '
126
+ if : github.event_name == 'pull_request '
127
127
# To update the test durations, do pip install pytest-split and run
128
128
# pytest --store-durations --durations-path tests/files/.pytest-split-durations
129
129
# and commit the results (requires pip install pytest-split)
130
130
run : |
131
- pytest --cov=pymatgen -- splits 10 --group ${{ matrix.split }} --durations-path tests/files/.pytest-split-durations tests
131
+ pytest --splits 10 --group ${{ matrix.split }} --durations-path tests/files/.pytest-split-durations tests
132
132
- name : Upload coverage
133
133
# Only upload coverage for ubuntu py3.11 runs. Continue on error as coverage is not critical.
134
134
continue-on-error : true
135
- if : matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'
135
+ if : github.event_name != 'pull_request' && matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'
136
136
uses : actions/upload-artifact@v3
137
137
with :
138
138
name : coverage-${{ matrix.split }}
@@ -141,6 +141,7 @@ jobs:
141
141
coverage :
142
142
# Only upload coverage for ubuntu py3.11 runs. Continue on error as coverage is not critical.
143
143
continue-on-error : true
144
+ if : github.event_name != 'pull_request'
144
145
needs : test
145
146
runs-on : ubuntu-latest
146
147
steps :
0 commit comments