forked from enviPath/enviPy
88 lines
2.3 KiB
YAML
88 lines
2.3 KiB
YAML
name: CI
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- develop
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
test:
|
|
if: ${{ !contains(gitea.event.pull_request.title, 'WIP') }}
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: git.envipath.com/envipath/envipy-ci:latest
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:16
|
|
env:
|
|
POSTGRES_USER: ${{ vars.POSTGRES_USER }}
|
|
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }}
|
|
POSTGRES_DB: ${{ vars.POSTGRES_DB }}
|
|
ports:
|
|
- ${{ vars.POSTGRES_PORT}}:5432
|
|
options: >-
|
|
--health-cmd="pg_isready -U postgres"
|
|
--health-interval=10s
|
|
--health-timeout=5s
|
|
--health-retries=5
|
|
|
|
#redis:
|
|
# image: redis:7
|
|
# ports:
|
|
# - 6379:6379
|
|
# options: >-
|
|
# --health-cmd "redis-cli ping"
|
|
# --health-interval=10s
|
|
# --health-timeout=5s
|
|
# --health-retries=5
|
|
|
|
env:
|
|
RUNNER_TOOL_CACHE: /toolcache
|
|
EP_DATA_DIR: /opt/enviPy/
|
|
ALLOWED_HOSTS: 127.0.0.1,localhost
|
|
DEBUG: True
|
|
LOG_LEVEL: INFO
|
|
MODEL_BUILDING_ENABLED: True
|
|
APPLICABILITY_DOMAIN_ENABLED: True
|
|
ENVIFORMER_PRESENT: True
|
|
ENVIFORMER_DEVICE: cpu
|
|
FLAG_CELERY_PRESENT: False
|
|
PLUGINS_ENABLED: True
|
|
SERVER_URL: http://localhost:8000
|
|
ADMIN_APPROVAL_REQUIRED: True
|
|
REGISTRATION_MANDATORY: True
|
|
LOG_DIR: ''
|
|
# DB
|
|
POSTGRES_SERVICE_NAME: postgres
|
|
POSTGRES_DB: ${{ vars.POSTGRES_DB }}
|
|
POSTGRES_USER: ${{ vars.POSTGRES_USER }}
|
|
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }}
|
|
POSTGRES_PORT: 5432
|
|
# SENTRY
|
|
SENTRY_ENABLED: False
|
|
# MS ENTRA
|
|
MS_ENTRA_ENABLED: False
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
# Use shared setup action - includes all dependencies and migrations
|
|
- name: Setup enviPy Environment
|
|
uses: ./.gitea/actions/setup-envipy
|
|
with:
|
|
skip-frontend: 'false'
|
|
skip-playwright: 'false'
|
|
ssh-private-key: ${{ secrets.ENVIPY_CI_PRIVATE_KEY }}
|
|
run-migrations: 'true'
|
|
|
|
- name: Run frontend tests
|
|
run: |
|
|
.venv/bin/python manage.py test --tag frontend
|
|
|
|
- name: Run Django tests
|
|
run: |
|
|
.venv/bin/python manage.py test tests --exclude-tag slow --exclude-tag frontend
|