-
Notifications
You must be signed in to change notification settings - Fork 9
69 lines (52 loc) · 2.41 KB
/
python-examples.yml
File metadata and controls
69 lines (52 loc) · 2.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# .github/workflows/verify_examples.yml
#
# CI for python/examples/01-03 select_values scripts.
# Strategy: download the daily HallD SQLite snapshot so the examples
# run against real data with a proper schema.
name: Python examples verification
on:
push:
branches: ['*']
pull_request:
branches: [main]
env:
# Single source of truth for the connection string
RCDB_CONNECTION: "sqlite:///${{ github.workspace }}/tmp/rcdb2.sqlite"
jobs:
run-examples:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.9"
- name: Install rcdb
run: |
python -m pip install --upgrade pip
cd $GITHUB_WORKSPACE/python
pip install --editable .
pip install jsonpickle # for writing object example
# - name: Download HallD SQLite snapshot
# run: |
# mkdir -p $GITHUB_WORKSPACE/tmp
# # Future put db creation here
# ── Run examples ──────────────────────────────────────────────
# Each example gets its own step so failures are visible per-script.
# continue-on-error keeps the workflow green while showing which
# script had problems (yellow badge instead of silent swallow).
- name: "Example: 01_select_values_simple"
run: python $GITHUB_WORKSPACE/python/examples/01_select_values_simple.py
# Script must read RCDB_CONNECTION env var (see updated examples)
- name: "Example: 02_select_values_extended"
run: python $GITHUB_WORKSPACE/python/examples/02_select_values_extended.py
- name: "Example: 03_select_values_custom_runs"
run: python $GITHUB_WORKSPACE/python/examples/03_select_values_custom_runs.py
- name: "Example: 10_create_conditions_basic"
run: python $GITHUB_WORKSPACE/python/examples/10_create_conditions_basic.py
- name: "Example: 11_crete_conditions_store_array"
run: python $GITHUB_WORKSPACE/python/examples/11_crete_conditions_store_array.py
- name: "Example: 12_create_conditions_store_object"
run: python $GITHUB_WORKSPACE/python/examples/12_create_conditions_store_object.py
- name: "Example: 90_advanced_sqlalchemy_query"
run: python $GITHUB_WORKSPACE/python/examples/90_advanced_sqlalchemy_query.py