Skip to content

Expand reservation workflow coverage and harden invalid-date handling #389

Expand reservation workflow coverage and harden invalid-date handling

Expand reservation workflow coverage and harden invalid-date handling #389

Workflow file for this run

name: Build
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
jobs:
test-and-analyze:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: 3.13 # Upgrade when pysonar conflict for 'type' error resolved
- name: Install dependencies
run: cd backend && pip install -r requirements.txt pytest pytest-cov pytest-django pysonar
- name: Run tests with coverage
run: cd backend && pytest --cov=. --cov-report=xml
- name: Run SonarCloud analysis
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
pysonar \
--sonar-project-key=conorheffron_booking-sys \
--sonar-organization=conorheffron \
--sonar-token=$SONAR_TOKEN