Skip to content

[back] fix: validate score and score_max in ComparisonCriteriaScore form #6870

[back] fix: validate score and score_max in ComparisonCriteriaScore form

[back] fix: validate score and score_max in ComparisonCriteriaScore form #6870

Workflow file for this run

name: Backend lint and tests
on:
# Run tests only when 'backend' or CI config has changed
push:
paths:
- 'backend/**'
- '.github/workflows/backend-ci.yml'
pull_request:
paths:
- 'backend/**'
- '.github/workflows/backend-ci.yml'
defaults:
run:
working-directory: backend
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:13
env:
POSTGRES_USER: postgres
POSTGRES_DB: tournesol
POSTGRES_PASSWORD: password
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Install dependencies
run: |
pip install -r requirements.txt
pip install -r tests/requirements.txt
- name: Python Code Quality Checks
run: ./scripts/ci/lint.sh
- name: Run pytest
run: pytest
- name: Run bandit
run: bandit -r . -c bandit.yaml