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
27 changes: 21 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ name: CI
on: [push, pull_request]

jobs:
build:
test:
runs-on: ubuntu-latest
strategy:
matrix:
# Define the specific versions you want to test against
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
Expand All @@ -21,9 +20,7 @@ jobs:
- name: Install Dependencies
run: |
pip install --upgrade pip
# Install pinned dependencies first for reproducibility
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
# Install the project in editable mode + dev tools
pip install -e ".[dev]"

- name: Lint & Format Check (Ruff)
Expand All @@ -36,6 +33,24 @@ jobs:
bandit -c pyproject.toml -r .

- name: Run Tests with Coverage
# pytest will read config from pyproject.toml
run: |
pytest
pytest

docker:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build Docker Image
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile
push: false
tags: project-image:latest
cache-from: type=gha
cache-to: type=gha,mode=max
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ WORKDIR /app

USER root

RUN apt-get update && apt-get upgrade -y && apt-get clean && rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get upgrade -y && \
apt-get install -y --no-install-recommends gcc g++ pkg-config && \
apt-get clean && rm -rf /var/lib/apt/lists/*

RUN groupadd -r nonroot_usr && useradd -r -g nonroot_usr nonroot_usr

Expand Down
Loading