Implement buzzer connection status indicator and log level control (TODO #13) #15
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: Backend CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| paths: | |
| - 'service/**' | |
| - '.github/workflows/backend-ci.yml' | |
| pull_request: | |
| branches: [ main ] | |
| paths: | |
| - 'service/**' | |
| - '.github/workflows/backend-ci.yml' | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install dependencies | |
| run: | | |
| cd service | |
| pip install -r requirements.lock | |
| pip install coverage | |
| - name: Run tests with coverage | |
| run: | | |
| cd service | |
| coverage run --source='.' manage.py test | |
| coverage report --fail-under=80 | |
| coverage xml | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v3 | |
| with: | |
| files: ./service/coverage.xml | |
| flags: backend | |
| fail_ci_if_error: false | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install linters | |
| run: pip install black flake8 | |
| - name: Run black | |
| run: | | |
| cd service | |
| black --check . | |
| - name: Run flake8 | |
| run: | | |
| cd service | |
| flake8 . |