mirror of
https://github.com/WGDashboard/WGDashboard-PRW.git
synced 2026-12-01 17:07:41 +00:00
feat: try to build out
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
name: Backend checks
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
python:
|
||||
runs-on: ubuntu-latest
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:16
|
||||
env:
|
||||
POSTGRES_USER: wgdashboard
|
||||
POSTGRES_PASSWORD: wgdashboard
|
||||
POSTGRES_DB: wgdashboard
|
||||
ports:
|
||||
- 5432:5432
|
||||
options: >-
|
||||
--health-cmd "pg_isready -U wgdashboard -d wgdashboard"
|
||||
--health-interval 10s
|
||||
--health-timeout 5s
|
||||
--health-retries 5
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.13"
|
||||
cache: pip
|
||||
cache-dependency-path: src/requirements.txt
|
||||
- run: python -m venv .venv
|
||||
- run: .venv/bin/python -m pip install -r src/requirements.txt pytest pyright ruff
|
||||
- run: .venv/bin/ruff check
|
||||
- run: .venv/bin/pyright
|
||||
- run: .venv/bin/pytest
|
||||
- run: .venv/bin/alembic upgrade head
|
||||
env:
|
||||
WGDASHBOARD_DATABASE_URL: postgresql+psycopg://wgdashboard:wgdashboard@localhost:5432/wgdashboard
|
||||
@@ -0,0 +1,47 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
python:
|
||||
name: Python lint and tests
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.13"
|
||||
- name: Install Python dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
python -m pip install -r src/requirements.txt pytest ruff
|
||||
- name: Lint Python
|
||||
run: ruff check src
|
||||
- name: Run Python tests
|
||||
run: pytest -q
|
||||
|
||||
web:
|
||||
name: ${{ matrix.app }} lint and tests
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
app: [admin, client]
|
||||
defaults:
|
||||
run:
|
||||
working-directory: src/web/${{ matrix.app }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "26"
|
||||
cache: npm
|
||||
cache-dependency-path: src/web/${{ matrix.app }}/package-lock.json
|
||||
- run: npm ci
|
||||
- run: npm run lint
|
||||
- run: npm test
|
||||
Reference in New Issue
Block a user