Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 19 additions & 19 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
name: Python CI
name: Checks

on:
push:
branches: ["dev", "master"]
branches:
- master
- dev
pull_request:
branches: ["dev", "master"]
branches:
- master
- dev

permissions:
contents: read

jobs:
build:
lint:
name: Lint & type-check (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
python-version: ["3.12", "3.13"]
python-version: ["3.13"]

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false

- name: Set up Python
uses: actions/setup-python@v5
- uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7
with:
python-version: ${{ matrix.python-version }}
cache: "pip"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[dev]

- name: Ruff
run: ruff check .

- name: Mypy
run: mypy .
- run: uv sync --group dev
- run: uv run ruff check src
- run: uv run ruff format --check src
- run: uv run mypy . --strict
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM python:3.13-slim-bookworm AS python-base
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PIP_NO_CACHE_DIR=1 \
APP_PATH=/prodik \
APP_PATH=/conode \
UV_VERSION=0.9.22

ENV VIRTUAL_ENV="$APP_PATH/.venv"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Fun, useless (maybe), interactive project +_+
Fun, useless (maybe), interactive project +_+
27 changes: 27 additions & 0 deletions deploy/init.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
-- Initialize user and database for KeyCloak

CREATE ROLE keycloak
WITH
LOGIN
PASSWORD 'keycloakPassword';

CREATE DATABASE keycloak
OWNER keycloak
ENCODING 'UTF8'
TEMPLATE template0;

\connect keycloak;

GRANT ALL PRIVILEGES ON DATABASE keycloak TO keycloak;

GRANT ALL ON SCHEMA public TO keycloak;
ALTER SCHEMA public OWNER TO keycloak;

ALTER DEFAULT PRIVILEGES IN SCHEMA public
GRANT ALL ON TABLES TO keycloak;

ALTER DEFAULT PRIVILEGES IN SCHEMA public
GRANT ALL ON SEQUENCES TO keycloak;

ALTER DEFAULT PRIVILEGES IN SCHEMA public
GRANT ALL ON FUNCTIONS TO keycloak;
8 changes: 8 additions & 0 deletions deploy/keycloak.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
KC_DB=postgres
KC_DB_USERNAME=keycloak
KC_DB_URL_HOST=postgres
KC_DB_URL_PORT=5432
KC_BOOTSTRAP_ADMIN_USERNAME=keycloak
KC_BOOTSTRAP_ADMIN_PASSWORD=keycloakPassword
KC_DB_PASSWORD=keycloakPassword
KC_HEALTH_ENABLED=true
Loading
Loading