Skip to content

Commit de52d04

Browse files
authored
Ci for main (#16)
* Readme final, docs improved * Docs improvement, refactor analyzer, example added * Added scripts for setup, added pytest, improved readme * Example LB improvements * CI for main + system tests
1 parent d77415e commit de52d04

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+2552
-1686
lines changed

.github/workflows/ci-develop.yml

Lines changed: 21 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,100 +1,51 @@
1-
name: CI – Develop Branch
2-
3-
4-
# Triggers
5-
# --------
6-
# • pull_request → quick job (lint + type-check + unit tests)
7-
# • push → full job (quick job + DB migrations + integration tests +
8-
# Docker build & smoke test)
1+
name: CI – Main Branch (Single Job, System Required)
92

103
on:
114
pull_request:
12-
branches: [develop]
13-
push:
14-
branches: [develop]
5+
branches: [main]
6+
workflow_dispatch:
157

8+
concurrency:
9+
group: ci-main-${{ github.ref }}
10+
cancel-in-progress: true
1611

17-
# Job 1 ─ Quick validation (executed only on pull_request events)
18-
# --------------------------------------------------------------------------- #
19-
# Runs fast checks that give reviewers immediate feedback. No external
20-
# services or Docker are used to keep runtime under one minute.
12+
env:
13+
PYTHON_VERSION: "3.12"
14+
MPLBACKEND: Agg
15+
ASYNCFLOW_RUN_SYSTEM_TESTS: "1"
2116

2217
jobs:
23-
quick:
24-
if: github.event_name == 'pull_request'
18+
all-checks:
2519
runs-on: ubuntu-latest
20+
timeout-minutes: 25
2621

2722
steps:
28-
# Checkout repository
29-
- uses: actions/checkout@v3
23+
- uses: actions/checkout@v4
3024

31-
# Install Python 3.12
32-
- uses: actions/setup-python@v4
25+
- uses: actions/setup-python@v5
3326
with:
34-
python-version: "3.12"
27+
python-version: ${{ env.PYTHON_VERSION }}
28+
cache: 'pip'
3529

36-
# Restore Poetry cache for faster installs
3730
- uses: actions/cache@v3
3831
with:
3932
path: ~/.cache/pypoetry
4033
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
4134

42-
# Install project + development dependencies
43-
- name: Install dependencies
35+
- name: Install Poetry & deps
4436
run: |
4537
curl -sSL https://install.python-poetry.org | python3 -
38+
export PATH="$HOME/.local/bin:$PATH"
4639
poetry config virtualenvs.create false
4740
poetry install --with dev --no-interaction
4841
49-
# Code quality gates
50-
- name: Run Ruff (lint & formatting check)
42+
- name: Ruff (lint)
5143
run: poetry run ruff check src tests
5244

53-
- name: Run MyPy (type-check)
45+
- name: MyPy (type-check)
5446
run: poetry run mypy src tests
55-
56-
# Unit-tests only (exclude integration markers)
57-
- name: Run unit tests
58-
env:
59-
ENVIRONMENT: test
60-
run: poetry run pytest -m "not integration" --disable-warnings
61-
62-
63-
64-
# Job 2 ─ Full validation (executed only on push events)
65-
full:
66-
if: |
67-
github.event_name == 'push' &&
68-
github.ref == 'refs/heads/develop'
69-
runs-on: ubuntu-latest
70-
71-
steps:
72-
- uses: actions/checkout@v3
73-
- uses: actions/setup-python@v4
74-
with: { python-version: '3.12' }
75-
- uses: actions/cache@v3
76-
with:
77-
path: ~/.cache/pypoetry
78-
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
7947

80-
- name: Install dependencies
81-
run: |
82-
curl -sSL https://install.python-poetry.org | python3 -
83-
poetry config virtualenvs.create false
84-
poetry install --with dev --no-interaction
85-
86-
- name: Run Ruff
87-
run: poetry run ruff check src tests
88-
89-
- name: Run mypy
90-
run: poetry run mypy src
91-
92-
- name: Run all tests
48+
- name: All tests (unit + integration + system)
9349
run: |
9450
poetry run pytest \
95-
--cov=src --cov-report=term \
9651
--disable-warnings
97-
98-
99-
100-

.github/workflows/ci-main.yml

Whitespace-only changes.

0 commit comments

Comments
 (0)