Implement zero inflated negative binomial likelihood (ZINB) for HBR #398
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This configuration does the following: | |
| # It runs the tests when code is pushed to dev branch and | |
| # when a pull request to dev is created. | |
| # It sets up a Python environment, installs project dependencies, and runs pytest. | |
| # Test results are uploaded as artifacts for later examination. | |
| name: testing | |
| on: | |
| push: | |
| branches: | |
| - dev | |
| pull_request: | |
| branches: | |
| - dev | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install Dependencies | |
| run: | # Install the project dependencies, including pytest-html for generating test reports in the next steps. | |
| pip install -e ".[dev]" | |
| pip install pytest-html | |
| - name: Run Tests with coverage and save report | |
| run: | | |
| coverage run -m pytest test/ --junitxml=report.xml --html=report.html | |
| coverage xml -o coverage.xml | |
| continue-on-error: true # Continue to the next step even if tests fail | |
| - name: Upload HTML Report | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-report-html | |
| path: report.html | |
| - name: Upload XML Report | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-report-xml | |
| path: report.xml | |
| - name: Upload Coverage Report | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-report | |
| path: coverage.xml |