Merge pull request 'Add Gitea Actions CI pipeline' (#1) from ci/add-pipeline into mealie-next
Reviewed-on: http://localhost:3001/dana/mealie/pulls/1
This commit is contained in:
commit
3e48042280
1 file changed
+61
@@ -0,0 +1,61 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ mealie-next ]
|
||||
push:
|
||||
branches: [ mealie-next ]
|
||||
|
||||
env:
|
||||
PRODUCTION: "false"
|
||||
UV_FROZEN: "1"
|
||||
|
||||
jobs:
|
||||
backend:
|
||||
name: Backend Lint and Test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Verify lockfile matches pyproject.toml
|
||||
run: env -u UV_FROZEN uv lock --check
|
||||
|
||||
- name: Install dependencies
|
||||
run: uv sync --group dev
|
||||
|
||||
- name: Ruff lint
|
||||
run: uv run ruff check .
|
||||
|
||||
- name: Ruff format check
|
||||
run: uv run ruff format --check .
|
||||
|
||||
- name: Mypy typecheck
|
||||
run: uv run mypy mealie
|
||||
|
||||
- name: Pytest - unit tests
|
||||
env:
|
||||
DB_ENGINE: sqlite
|
||||
run: uv run pytest tests/unit_tests -n auto --dist loadfile
|
||||
|
||||
frontend:
|
||||
name: Frontend Lint and Test
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: frontend
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install --prefer-offline
|
||||
|
||||
- name: Prepare nuxt
|
||||
run: pnpm nuxt prepare
|
||||
|
||||
- name: Run linter
|
||||
run: pnpm lint --max-warnings=0
|
||||
|
||||
- name: Run tests
|
||||
run: pnpm test:ci
|
||||
Reference in new issue
Block a user