Skip to content

Commit d53ab0b

Browse files
committed
Add GitHub workflow
1 parent 26b3bc4 commit d53ab0b

1 file changed

Lines changed: 78 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: CI
2+
3+
# Triggers: when this workflow runs
4+
on:
5+
push:
6+
branches:
7+
- main # run on pushes to main
8+
- test # run on pushes to test
9+
tags:
10+
- "*" # run on any tag push (useful for releases)
11+
pull_request:
12+
branches:
13+
- main # run on PRs targeting main
14+
workflow_dispatch: # allow manual runs from the Actions tab
15+
16+
# Cancel in-progress runs when a new commit is pushed to the same ref.
17+
concurrency:
18+
group: ${{ github.workflow }}-${{ github.ref }}
19+
cancel-in-progress: true
20+
21+
# Start with zero permissions; grant per-job what's actually needed.
22+
permissions: {}
23+
24+
env:
25+
PYTHON_VERSION: '3.12'
26+
27+
jobs:
28+
check:
29+
name: Check with rdmo-app
30+
runs-on: ubuntu-slim
31+
steps:
32+
- name: Checkout repo 🛎️
33+
uses: actions/checkout@v6
34+
with:
35+
persist-credentials: false
36+
37+
- name: Set up Python
38+
uses: actions/setup-python@v5
39+
with:
40+
python-version: ${{ env.PYTHON_VERSION }}
41+
cache: 'pip'
42+
43+
- name: Set up rdmo-app for testing
44+
uses: rdmorganiser/actions/setup
45+
46+
- name: Install plugin
47+
run: pip install -e .
48+
49+
- name: Configure plugin
50+
working-directory: rdmo-app
51+
run: |
52+
cat >> config/settings/local.py <<'EOF'
53+
INSTALLED_APPS = ['rdmo_llm_views', 'django_q', *INSTALLED_APPS]
54+
55+
LLM_VIEWS_ADAPTER = 'rdmo_llm_views.adapter.OpenAILangChainAdapter'
56+
LLM_VIEWS_LLM_ARGS = {}
57+
58+
LLM_VIEWS_SELECT_MODEL = True
59+
LLM_VIEWS_TIMEOUT = 4000
60+
61+
Q_CLUSTER = {
62+
'name': 'DjangORM',
63+
'workers': 1,
64+
'timeout': 900,
65+
'retry': 120,
66+
'queue_limit': 1,
67+
'bulk': 1,
68+
'orm': 'default'
69+
}
70+
EOF
71+
72+
- name: Run migrations
73+
working-directory: rdmo-app
74+
run: ./manage.py migrate
75+
76+
- name: Run Django system checks
77+
working-directory: rdmo-app
78+
run: ./manage.py check

0 commit comments

Comments
 (0)