@@ -2,7 +2,7 @@ name: PharmaPy CI/CD Pipeline
22
33on :
44 push :
5- branches : [ main, master, develop, test-devel ]
5+ branches : [ main, master, develop ]
66 pull_request :
77 branches : [ main, master, develop ]
88 schedule :
@@ -157,11 +157,11 @@ jobs:
157157 python -m pytest tests/integration/test_assimulo.py::TestAssimuloIntegration::test_assimulo_version_compatibility -v
158158 python -m pytest tests/integration/test_assimulo.py::TestAssimuloIntegration::test_sundials_integration -v
159159
160- # Installation script testing - only on push to specific branches
160+ # Installation script testing - runs on all pushes
161161 test-installation-scripts :
162162 name : Installation Scripts
163163 timeout-minutes : 20 # Prevent long-running jobs
164- if : github.event_name == 'push' && (contains(github.ref, 'main') || contains(github.ref, 'master') || contains(github.ref, 'test-devel'))
164+ if : github.event_name == 'push'
165165 runs-on : ${{ matrix.os }}
166166 strategy :
167167 fail-fast : false
@@ -195,10 +195,9 @@ jobs:
195195 conda activate pharmapy-ci-test
196196 python -c "import PharmaPy; print('Unix script installation successful')"
197197
198- # Code quality and documentation - only on main branches
198+ # Code quality and documentation - run on every push
199199 quality-and-docs :
200200 name : Code Quality & Documentation
201- if : github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
202201 runs-on : ubuntu-latest
203202
204203 steps :
@@ -220,13 +219,31 @@ jobs:
220219 pip install -e .
221220 pip install -r requirements-dev.txt
222221
222+ - name : Install pandoc (for documentation)
223+ shell : bash -l {0}
224+ run : |
225+ conda install -c conda-forge pandoc --yes
226+
227+ - name : Install assimulo (for code quality checks)
228+ shell : bash -l {0}
229+ continue-on-error : true
230+ run : |
231+ conda install -c conda-forge assimulo --yes || pip install assimulo || echo "Assimulo installation failed, but continuing"
232+
223233 - name : Run linting
224234 shell : bash -l {0}
225235 continue-on-error : true
226236 run : |
227237 flake8 PharmaPy/ --count --select=E9,F63,F7,F82 --show-source --statistics
228238 flake8 PharmaPy/ --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
229239
240+ - name : Check code formatting with black
241+ shell : bash -l {0}
242+ continue-on-error : true
243+ run : |
244+ echo "Checking code formatting with black..."
245+ black --check --diff PharmaPy/ tests/ *.py --exclude="/(\.git|\.venv|\.tox|build|dist|\.eggs)/"
246+
230247 - name : Generate coverage report
231248 shell : bash -l {0}
232249 run : |
@@ -258,10 +275,9 @@ jobs:
258275 name : documentation
259276 path : doc/_build/html/
260277
261- # Build and packaging - only on main branches and releases
278+ # Build and packaging - runs on all pushes
262279 build-and-package :
263280 name : Build & Package
264- if : github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')
265281 runs-on : ubuntu-latest
266282
267283 steps :
0 commit comments