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
37 changes: 17 additions & 20 deletions .github/workflows/hypha-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,25 +30,23 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
env:
DATABASE_URL: postgresql://hypha:hypha@localhost/hypha?sslmode=disable
DATABASE_URL: postgres://hypha:hypha@localhost/hypha?sslmode=disable
DJANGO_SETTINGS_MODULE: hypha.settings.test
SEND_MESSAGES: false
PYTHONDONTWRITEBYTECODE: 1
APPLICATION_TRANSLATIONS_ENABLED: 1 # Run tests for machine translation logic

services:
postgres:
image: bitnamilegacy/postgresql:17
image: postgres:17
env:
POSTGRESQL_USERNAME: hypha
POSTGRESQL_PASSWORD: hypha
POSTGRESQL_DATABASE: hypha
POSTGRESQL_FSYNC: "off"
POSTGRESQL_REPLICATION_USE_PASSFILE: "no"
POSTGRES_USER: hypha
POSTGRES_PASSWORD: hypha
POSTGRES_DB: hypha
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -d hypha -U hypha -p 5432"
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
Expand All @@ -59,36 +57,35 @@ jobs:

steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version-file: ".python-version"

- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
cache-dependency-glob: "requirements**.txt"

- name: Install python dependencies
run: |
uv venv
uv pip install -r requirements/dev.txt -r requirements/translate.txt
uv sync --frozen --group translate

- name: Create static_compiled dir
run: |
mkdir hypha/static_compiled

- name: Check Django migrations
if: matrix.group == 1
run: |
.venv/bin/python manage.py makemigrations --dry-run --verbosity=3
.venv/bin/python manage.py makemigrations --check
uv run python manage.py makemigrations --dry-run --verbosity=3
uv run python manage.py makemigrations --check

- name: Run django collectstatic
if: matrix.group == 2
run: |
.venv/bin/python manage.py collectstatic --noinput --no-post-process --verbosity=1
uv run python manage.py collectstatic --noinput --no-post-process --verbosity=1

- name: Check Django Setup
if: matrix.group == 3
run: |
.venv/bin/python manage.py check
uv run python manage.py check

- name: Run pytest
run: .venv/bin/pytest --splits 3 --group ${{ matrix.group }}
run: |
uv run pytest --splits 3 --group ${{ matrix.group }}
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/astral-sh/uv-pre-commit
rev: "0.9.22"
rev: "0.10.4"
hooks:
- id: uv-export
name: uv-export requirements/prod.txt
Expand Down Expand Up @@ -36,7 +36,7 @@ repos:
]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.14.10"
rev: "v0.15.1"
hooks:
# Run the linter.
- id: ruff
Expand All @@ -62,7 +62,7 @@ repos:
types_or: [html, css]

- repo: https://github.com/biomejs/pre-commit
rev: "v2.3.10"
rev: "v2.4.2"
hooks:
- id: biome-check
additional_dependencies: ["@biomejs/biome@1.9.4"]
Expand All @@ -74,14 +74,14 @@ repos:
files: .*/static_src/sass/.*\.scss$
args: [--fix]
additional_dependencies:
- stylelint@16.11.0
- stylelint@16.26.1
- stylelint-config-standard-scss@13.1.0
- repo: https://github.com/gitleaks/gitleaks
rev: v8.30.0
hooks:
- id: gitleaks

- repo: https://github.com/crate-ci/typos
rev: v1.41.0
rev: v1.43.5
hooks:
- id: typos
Loading
Loading