Refactor: Modernize project, add CI/CD, Tests and Multichannel Support #1
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: Python application | |
| on: | |
| push: | |
| branches: [ "master", "main" ] | |
| pull_request: | |
| branches: [ "master", "main" ] | |
| permissions: | |
| contents: read | |
| jobs: | |
| ci: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | |
| - name: Set up Python 3.13 | |
| uses: actions/setup-python@v3 | |
| with: | |
| python-version: "3.13" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| pip install -r requirements-dev.txt | |
| pip install -e . | |
| - name: Lint with Ruff | |
| run: ruff check . | |
| - name: Type check with Mypy | |
| run: mypy src | |
| - name: Security check with Bandit | |
| run: bandit -r src | |
| - name: Run tests | |
| run: | | |
| python tests/test_basic.py | |
| python tests/test_multichannel.py | |
| python tests/test_audio_processing.py | |
| - name: Verify graph generation | |
| run: | | |
| python generate_graphs.py | |
| - name: Snyk Security Scan | |
| uses: snyk/actions/python@master | |
| env: | |
| SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} | |
| continue-on-error: true | |
| with: | |
| args: --sarif-file-output=snyk.sarif | |
| - name: Upload Snyk scan results to GitHub Code Scanning | |
| uses: github/codeql-action/upload-sarif@v3 | |
| continue-on-error: true | |
| with: | |
| sarif_file: snyk.sarif | |
| - name: SonarQube Scan | |
| uses: SonarSource/sonarqube-scan-action@v2.1.0 | |
| env: | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
| SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} | |
| continue-on-error: true | |