Skip to content

feat: add pagination, filters and enhanced stats to logbook #37

feat: add pagination, filters and enhanced stats to logbook

feat: add pagination, filters and enhanced stats to logbook #37

Workflow file for this run

name: CI
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
jobs:
test:
name: Run tests
runs-on: ubuntu-latest
services:
postgres:
image: postgres:15-alpine
env:
POSTGRES_DB: simlog
POSTGRES_USER: simlog_user
POSTGRES_PASSWORD: simlog_password
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 5s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout code
uses: actions/checkout@v4.2.2
- name: Set up Python
uses: actions/setup-python@v5.6.0
with:
python-version: '3.12'
- name: Cache pip dependencies
uses: actions/cache@v4.2.3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/development.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: pip install -r requirements/development.txt
- name: Create .env file
run: |
echo "SECRET_KEY=test-secret-key-for-ci-only-must-be-at-least-32-chars" > .env
echo "DEBUG=True" >> .env
echo "DB_NAME=simlog" >> .env
echo "DB_USER=simlog_user" >> .env
echo "DB_PASSWORD=simlog_password" >> .env
echo "DB_HOST=localhost" >> .env
echo "DB_PORT=5432" >> .env
- name: Run flake8
run: python3 -m flake8 . --max-line-length=120
- name: Run bandit
run: python3 -m bandit -r . --exclude .venv,migrations -ll
- name: Run migrations
run: python3 manage.py migrate
env:
DJANGO_SETTINGS_MODULE: core.settings.docker
- name: Run tests
run: python3 -m pytest tests/ -v -W error::DeprecationWarning
env:
DJANGO_SETTINGS_MODULE: core.settings.docker