mirror of
https://github.com/apidoorman/doorman.git
synced 2026-05-05 15:49:13 -05:00
66 lines
1.7 KiB
YAML
66 lines
1.7 KiB
YAML
name: CI
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
on:
|
|
push:
|
|
branches: [ main, master ]
|
|
pull_request:
|
|
branches: [ main, master ]
|
|
|
|
jobs:
|
|
backend-tests:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.11'
|
|
- name: Install backend dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install -r backend-services/requirements.txt
|
|
- name: Run backend tests
|
|
env:
|
|
MEM_OR_EXTERNAL: MEM
|
|
HTTPS_ONLY: 'false'
|
|
HTTPS_ENABLED: 'false'
|
|
STRICT_RESPONSE_ENVELOPE: 'false'
|
|
JWT_SECRET_KEY: test-secret-key-please-change
|
|
STARTUP_ADMIN_EMAIL: admin@doorman.dev
|
|
STARTUP_ADMIN_PASSWORD: password1
|
|
MEM_ENCRYPTION_KEY: unit-test-key-32chars-abcdef123456!!
|
|
ALLOWED_HEADERS: '*'
|
|
ALLOW_HEADERS: '*'
|
|
ALLOW_METHODS: '*'
|
|
ALLOWED_ORIGINS: http://localhost:3000
|
|
working-directory: backend-services
|
|
run: pytest -q tests
|
|
|
|
frontend-build:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
- name: Use Node.js 20
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20'
|
|
cache: 'npm'
|
|
cache-dependency-path: web-client/package-lock.json
|
|
- name: Install dependencies
|
|
working-directory: web-client
|
|
run: npm ci
|
|
- name: Build web client
|
|
working-directory: web-client
|
|
env:
|
|
NEXT_PUBLIC_SERVER_URL: http://localhost:5001
|
|
run: npm run build
|