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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
11 changes: 0 additions & 11 deletions .env

This file was deleted.

124 changes: 124 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
name: CI

on:
push:
branches: [main]
pull_request:
branches: [main, dev]



jobs:
test:
permissions:
contents: read
runs-on: ubuntu-latest

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

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.14"
cache: pip
cache-dependency-path: requirements.txt

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest pytest-cov

- name: Run tests with coverage
run: pytest --cov=. --cov-report=term --cov-report=xml --cov-report=html

- name: Upload coverage artifacts
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: |
coverage.xml
htmlcov/
if-no-files-found: error

lint:
permissions:
contents: read
runs-on: ubuntu-latest

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

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.14"
cache: pip

- name: Install Ruff
run: |
python -m pip install --upgrade pip
pip install ruff

- name: Run Ruff
run: ruff check

bandit:
permissions:
contents: read
runs-on: ubuntu-latest

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

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.14"
cache: pip

- name: Install Bandit
run: |
python -m pip install --upgrade pip
pip install bandit

- name: Run Bandit
run: bandit -c pyproject.toml -r . -ll -x ./tests/

gitleaks:
runs-on: ubuntu-latest
permissions:
contents: read

steps:
- name: Checkout repository (full history)
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install Gitleaks (via cli)
run: |
curl -sSL -o /tmp/gitleaks.tar.gz https://github.com/gitleaks/gitleaks/releases/download/v8.30.0/gitleaks_8.30.0_linux_x64.tar.gz
tar xz -C /tmp -f /tmp/gitleaks.tar.gz
sudo mv /tmp/gitleaks /usr/local/bin/gitleaks
sudo chmod +x /usr/local/bin/gitleaks

- name: Run Gitleaks
run: gitleaks detect --source . --redact --verbose --exit-code 1

semgrep:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Run Semgrep
uses: semgrep/semgrep-action@v1
with:
config: p/security-audit
20 changes: 20 additions & 0 deletions .github/workflows/main-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Restrict PR Source

on:
pull_request:
branches:
- main

jobs:
check-branch:
runs-on: ubuntu-latest
env:
GITHUB_HEAD_REF: ${{ github.head_ref }}
steps:

- name: Fail if not from develop
run: |
if [[ $GITHUB_HEAD_REF != "dev" ]]; then
echo "PR must come from develop branch only."
exit 1
fi
Loading
Loading