Skip to content
Merged
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
48 changes: 48 additions & 0 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Python Tests

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

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

env:
ADMIN_USERNAME: ${{ secrets.ADMIN_USERNAME }}
ADMIN_PASSWORD: ${{ secrets.ADMIN_PASSWORD }}
SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
SUPERBASE_SERVICE_ROLE_KEY: ${{ secrets.SUPERBASE_SERVICE_ROLE_KEY }}
SUPABASE_ANON_KEY: ${{ secrets.SUPERBASE_ANON_KEY }}
SUPERBASE_S3_BUCKET_NAME: ${{ secrets.SUPERBASE_S3_BUCKET_NAME }}

Comment on lines +15 to +22
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Fix the SUPABASE secret names.

You mix SUPABASE_* and SUPERBASE_* keys. Unless the repository really defines both spellings, the latter will resolve to empty strings at runtime. Align the secret names with the actual Supabase keys (probably SUPABASE_*).

🤖 Prompt for AI Agents
.github/workflows/python-app.yml lines 15-22: the workflow mixes SUPABASE_* and
misspelled SUPERBASE_* environment variables which will be empty at runtime;
change SUPERBASE_SERVICE_ROLE_KEY and SUPERBASE_S3_BUCKET_NAME to
SUPABASE_SERVICE_ROLE_KEY and SUPABASE_S3_BUCKET_NAME (or match the exact secret
names defined in the repo settings) so all Supabase-related env keys
consistently use the correct SUPABASE_* spelling.

steps:
- uses: actions/checkout@v4

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

Comment on lines +26 to +30
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Confirm hosted runners ship Python 3.13
As of early 2025, GitHub’s ubuntu-latest image did not yet offer Python 3.13. Please double-check that it’s now available (or fall back to 3.11/3.12) so setup-python doesn’t fail.


🏁 Script executed:

#!/bin/bash
# Verify which CPython releases ubuntu-latest exposes today
python -m pip install --upgrade pip
python -c "import sys; print(sys.version)"
pyenv versions || true

Length of output: 688


Use a supported Python version in your workflow
ubuntu-latest doesn’t ship 3.13 yet; change python-version to "3.12" (or fall back to ['3.13','3.12']) to prevent setup-python from failing.
Location: .github/workflows/python-app.yml:26-30

🤖 Prompt for AI Agents
In .github/workflows/python-app.yml around lines 26 to 30, the workflow is
setting python-version to "3.13" which ubuntu-latest doesn't ship yet; update
the python-version to a supported value such as "3.12" or provide a fallback
array like ['3.13','3.12'] so setup-python won't fail — modify the value
accordingly in the workflow file and commit the change.

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest playwright
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi

- name: Install Playwright browsers
run: |
playwright install --with-deps chromium

- name: Lint with flake8
run: |
# Stop build if there are syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# Exit-zero treats all errors as warnings (so build continues)
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Run pytest
run: pytest -v --maxfail=3 --disable-warnings