Skip to content

refactor: introduce declarative permission pattern for authorization #211

refactor: introduce declarative permission pattern for authorization

refactor: introduce declarative permission pattern for authorization #211

Workflow file for this run

name: CI
on: [ push, pull_request ]
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.12.0
- name: Install UV and dependencies
run: |
python -m pip install --upgrade pip
python -m pip install uv==0.5.7
uv pip install -e '.[dev,test]' --system
- name: Format code
run: |
ruff format
- name: Lint code
run: |
ruff check --exit-non-zero-on-fix
slotscheck src
mypy
- name: Test code
run: |
pytest -v
- name: Test Docker Compose setup
run: |
export APP_ENV=local
python config/toml_config_manager.py
cd config/local
echo "Generated .env.local content:"
cat .env.local
export COMPOSE_ENV_FILES=.env.local
docker compose up -d --build
- name: Verify Application Health
run: |
timeout 10s bash -c '
while ! curl -sf http://0.0.0.0:9999/api/v1/; do
sleep 1
done
'
- name: Test Signup Handler
run: |
timeout 10s bash -c "
while ! curl -sf -X POST \
'http://0.0.0.0:9999/api/v1/account/signup' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
\"username\": \"string\",
\"password\": \"string\"
}'; do
sleep 1
done
"