Skip to content
Merged

Dev #32

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
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2
updates:
- package-ecosystem: "pip"
directory: "/"
target-branch: "dev"
schedule:
interval: "monthly"
open-pull-requests-limit: 1
groups:
all-python-deps:
patterns:
- "*"
47 changes: 47 additions & 0 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: CI/CD

on:
push:
branches: [main]
paths-ignore:
- "requirements.txt"
workflow_dispatch:

permissions:
contents: write
pages: write
id-token: write

jobs:
run-tests:
uses: ./.github/workflows/tests.yml

build-docs:
needs: run-tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install Doxygen & Graphviz
run: |
sudo apt-get update
sudo apt-get install -y doxygen graphviz

- name: Generate documentation
run: doxygen Doxyfile

- name: Upload artifact for GitHub Pages
uses: actions/upload-pages-artifact@v3
with:
path: ./docs/html

deploy-docs:
needs: build-docs
runs-on: ubuntu-latest
environment:
name: github-pages
steps:
- name: Deploy to GitHub Pages
id: deploy
uses: actions/deploy-pages@v4
33 changes: 33 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Tests

on:
pull_request:
branches: [dev]
workflow_call:
workflow_dispatch:

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: 3.12

- name: Install UV
uses: astral-sh/setup-uv@v2
with:
enable-cache: true

- name: Install dependencies & test tools
run: |
uv run pip install -r requirements.txt
uv run pip install pytest

- name: Run tests
run: uv run pytest src/tests/ -v --tb=short
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM python:3.11-slim

WORKDIR /app

COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

COPY . .

EXPOSE 5000

CMD ["gunicorn", "--bind", "0.0.0.0:5000", "app:app"]

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ readme = "README.md"
requires-python = ">=3.14"
dependencies = [
"flask>=3.1.2",
"gunicorn>=23.0.0",
"pytest>=9.0.2",
]
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
blinker==1.9.0
click==8.3.1
flask==3.1.2
gunicorn==23.0.0
iniconfig==2.3.0
itsdangerous==2.2.0
jinja2==3.1.6
Expand Down