mirror of
https://github.com/HabiRabbu/Musicseerr
synced 2026-04-21 13:37:27 +00:00
workflow improvements
This commit is contained in:
parent
31e0412232
commit
4ca1fdfd41
4 changed files with 28 additions and 51 deletions
14
.github/workflows/backend-ci.yml
vendored
14
.github/workflows/backend-ci.yml
vendored
|
|
@ -3,7 +3,15 @@ name: Backend CI
|
|||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'backend/**'
|
||||
- 'pyproject.toml'
|
||||
- '.github/workflows/backend-ci.yml'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'backend/**'
|
||||
- 'pyproject.toml'
|
||||
- '.github/workflows/backend-ci.yml'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
|
|
@ -21,9 +29,11 @@ jobs:
|
|||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.13'
|
||||
cache: 'pip'
|
||||
cache-dependency-path: backend/requirements-dev.txt
|
||||
|
||||
- name: Install Ruff
|
||||
run: pip install ruff
|
||||
run: pip install ruff==0.6.9
|
||||
|
||||
- name: Run Ruff
|
||||
run: ruff check backend
|
||||
|
|
@ -50,7 +60,7 @@ jobs:
|
|||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip setuptools wheel
|
||||
pip install -r requirements.txt -r requirements-dev.txt pytest pytest-asyncio
|
||||
pip install -r requirements-dev.txt
|
||||
|
||||
- name: Run tests
|
||||
run: python -m pytest
|
||||
|
|
|
|||
61
.github/workflows/frontend-ci.yml
vendored
61
.github/workflows/frontend-ci.yml
vendored
|
|
@ -3,7 +3,13 @@ name: Frontend CI
|
|||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'frontend/**'
|
||||
- '.github/workflows/frontend-ci.yml'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'frontend/**'
|
||||
- '.github/workflows/frontend-ci.yml'
|
||||
|
||||
defaults:
|
||||
run:
|
||||
|
|
@ -14,8 +20,8 @@ concurrency:
|
|||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
name: Lint
|
||||
quality:
|
||||
name: Lint, Format & Type Check
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
|
|
@ -39,53 +45,9 @@ jobs:
|
|||
- name: Run ESLint
|
||||
run: pnpm run lint
|
||||
|
||||
format:
|
||||
name: Format Check
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: 10
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '25'
|
||||
cache: 'pnpm'
|
||||
cache-dependency-path: frontend/pnpm-lock.yaml
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Run Prettier
|
||||
run: pnpm run format:check
|
||||
|
||||
typecheck:
|
||||
name: Type Check
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: 10
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '25'
|
||||
cache: 'pnpm'
|
||||
cache-dependency-path: frontend/pnpm-lock.yaml
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Run type check
|
||||
run: pnpm run check
|
||||
|
||||
|
|
@ -111,5 +73,8 @@ jobs:
|
|||
- name: Install dependencies
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Run tests (server project)
|
||||
run: pnpm exec vitest run --project server
|
||||
- name: Install Playwright browsers
|
||||
run: pnpm exec playwright install chromium --with-deps
|
||||
|
||||
- name: Run tests
|
||||
run: pnpm exec vitest run
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
##
|
||||
# Stage 1 — Build frontend
|
||||
##
|
||||
FROM node:22.16-alpine AS frontend-build
|
||||
FROM node:25-alpine AS frontend-build
|
||||
|
||||
WORKDIR /app/frontend
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
-r requirements.txt
|
||||
mypy==1.18.2
|
||||
pytest==8.3.5
|
||||
pytest-asyncio==0.25.3
|
||||
ruff==0.6.9
|
||||
types-PyYAML==6.0.12.20250915
|
||||
watchfiles==1.1.0
|
||||
|
|
|
|||
Loading…
Reference in a new issue