mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-12-09 20:05:20 -05:00
* Add pytesseract * Add simple ocr endpoint replace extension argument * feat/ocr-editor gui * fix frontend linting issues * Add service unit tests * Add split text modes & single ingredient/instruction editing * make split mode really reactive * Remove default step and ingredient * make the linter haappy * Accept only image uploads * Add automatic recipe title suggestion * Correct regex * fix incorrect array.map method usage * make the linter happy again * Swap route to use asset name * Rearange buttons * fix test data * feat: Allow making image the recipe image * Add translation * Make the linter happy * Restrict function setPropertyValueByPath generic * Restrict template literal type * Add a more friendly icon to creation page * update poetry lock file * Correct sloppy ocr classes * Make MyPy happy * Rewrite safer tests * Add tesseract to backend test CI container dependencies * Make canvas element a component global * Remove unwanted spaces in selected text * Add way to know if recipe was created with ocr * Access to ocr-editor for ocr recipes * Update Alembic revision * Make the frontend build * Fix scrolling offset bug * Allow creation of recipes with custom settings * Fix rebasing mistakes * Add format_tsv_output test * Exclude the tests data directory only * Enforce camelCase for frontend functions * Remove import of unused component * Fix type and class initialization * Add multi-language support * Highlight words in mount * Fix image ratio bug * Better ocr creation page * Revert awkward feature to scroll in Selection mode * Rebasing alembic migrations sux * Remove obsolete getShared function * Add function docstring * Move down ocr creation option * Make toolbar icons more generic * Show help at the bottom of the page * move ocr types to own file * Use template ref for the canvas * Use i18n.tc to get strings directly * Correct naming mistake * Move Ocr editor to own directory * Create Ocr Editor parts * Safeguard recipe properties access * Add loading frontend animation due to longer request time * minor cleanup chores Co-authored-by: Miroito <alban.vachette@gmail.com>
89 lines
2.6 KiB
YAML
89 lines
2.6 KiB
YAML
name: Backend Test/Lint
|
|
|
|
on:
|
|
workflow_call:
|
|
|
|
|
|
jobs:
|
|
tests:
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
PRODUCTION: false
|
|
|
|
strategy:
|
|
fail-fast: true
|
|
matrix:
|
|
# Database ENV Variablse as Specified by Mealie
|
|
Database: [sqlite, postgres]
|
|
|
|
# Services
|
|
services:
|
|
postgres:
|
|
image: postgres
|
|
env:
|
|
POSTGRES_USER: mealie
|
|
POSTGRES_PASSWORD: mealie
|
|
POSTGRES_DB: mealie
|
|
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
|
|
ports:
|
|
- 5432:5432
|
|
# Steps
|
|
steps:
|
|
#----------------------------------------------
|
|
# check-out repo and set-up python
|
|
#----------------------------------------------
|
|
- name: Check out repository
|
|
uses: actions/checkout@v2
|
|
- name: Set up python
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: "3.10"
|
|
#----------------------------------------------
|
|
# ----- install & configure poetry -----
|
|
#----------------------------------------------
|
|
- name: Install Poetry
|
|
uses: snok/install-poetry@v1
|
|
with:
|
|
virtualenvs-create: true
|
|
virtualenvs-in-project: true
|
|
#----------------------------------------------
|
|
# load cached venv if cache exists
|
|
#----------------------------------------------
|
|
- name: Load cached venv
|
|
id: cached-poetry-dependencies
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: .venv
|
|
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
|
|
#----------------------------------------------
|
|
# install dependencies if cache does not exist
|
|
#----------------------------------------------
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install libsasl2-dev libldap2-dev libssl-dev tesseract-ocr-all
|
|
poetry install
|
|
poetry add "psycopg2-binary==2.8.6"
|
|
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
|
|
|
|
#----------------------------------------------
|
|
# run test suite
|
|
#----------------------------------------------
|
|
- name: Formatting (Black & isort)
|
|
run: |
|
|
poetry run black . --check
|
|
poetry run isort . --check-only
|
|
- name: Lint (Flake8)
|
|
run: |
|
|
make backend-lint
|
|
- name: Mypy Typecheck
|
|
run: |
|
|
make backend-typecheck
|
|
- name: Pytest
|
|
env:
|
|
DB_ENGINE: ${{ matrix.Database }}
|
|
POSTGRES_SERVER: localhost
|
|
run: |
|
|
make backend-test
|