Merge pull request #21 from bprobert97/new-version-release #222
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
| name: Run Pylint, Mypy and Pytest | |
| on: [push] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.13"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v3 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| pip install pytest-cov # Ensure pytest-cov is installed for coverage reporting | |
| - name: Analyse the code with pylint | |
| run: | | |
| pylint src/ tests/ accord_demo.py mc_demo.py streamlit_app.py | |
| - name: Run mypy static type checker | |
| run: | | |
| mypy . | |
| - name: Run pytest with coverage and generate XML report | |
| run: | | |
| pytest --cov=src --cov-report=xml tests/ | |
| - name: Publish Code Coverage Summary | |
| uses: irongut/CodeCoverageSummary@v1.3.0 | |
| with: | |
| # Use the file generated in the previous step | |
| filename: coverage.xml | |
| # Optional: Display a badge and format the output as markdown | |
| badge: true | |
| format: markdown |