Skip to content

Commit fb08027

Browse files
committed
fixing a bug
1 parent de52d04 commit fb08027

File tree

2 files changed

+121
-21
lines changed

2 files changed

+121
-21
lines changed

.github/workflows/ci-develop.yml

Lines changed: 70 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,100 @@
1-
name: CI – Main Branch (Single Job, System Required)
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)
29

310
on:
411
pull_request:
5-
branches: [main]
6-
workflow_dispatch:
12+
branches: [develop]
13+
push:
14+
branches: [develop]
715

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

12-
env:
13-
PYTHON_VERSION: "3.12"
14-
MPLBACKEND: Agg
15-
ASYNCFLOW_RUN_SYSTEM_TESTS: "1"
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.
1621

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

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

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

36+
# Restore Poetry cache for faster installs
3037
- uses: actions/cache@v3
3138
with:
3239
path: ~/.cache/pypoetry
3340
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
3441

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

45-
- name: MyPy (type-check)
53+
- name: Run MyPy (type-check)
4654
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') }}
4779

48-
- name: All tests (unit + integration + system)
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
4993
run: |
5094
poetry run pytest \
95+
--cov=src --cov-report=term \
5196
--disable-warnings
97+
98+
99+
100+

.github/workflows/ci-main.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: CI – Main Branch
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
workflow_dispatch:
7+
8+
concurrency:
9+
group: ci-main-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
env:
13+
PYTHON_VERSION: "3.12"
14+
MPLBACKEND: Agg
15+
ASYNCFLOW_RUN_SYSTEM_TESTS: "1"
16+
17+
jobs:
18+
all-checks:
19+
runs-on: ubuntu-latest
20+
timeout-minutes: 25
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- uses: actions/setup-python@v5
26+
with:
27+
python-version: ${{ env.PYTHON_VERSION }}
28+
cache: 'pip'
29+
30+
- uses: actions/cache@v3
31+
with:
32+
path: ~/.cache/pypoetry
33+
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
34+
35+
- name: Install Poetry & deps
36+
run: |
37+
curl -sSL https://install.python-poetry.org | python3 -
38+
export PATH="$HOME/.local/bin:$PATH"
39+
poetry config virtualenvs.create false
40+
poetry install --with dev --no-interaction
41+
42+
- name: Ruff (lint)
43+
run: poetry run ruff check src tests
44+
45+
- name: MyPy (type-check)
46+
run: poetry run mypy src tests
47+
48+
- name: All tests (unit + integration + system)
49+
run: |
50+
poetry run pytest \
51+
--disable-warnings

0 commit comments

Comments
 (0)