Skip to content

Commit 04fc86e

Browse files
Gkclaude
authored andcommitted
ci: remove dormant workflows, add auto-merge for feature PRs
- Delete staging-integration.yml (dormant repository_dispatch, never fired) - Delete argus-qa.yml (Argus QA handled separately) - Add feature-to-main.yml: pytest on PRs → auto-merge → CueAPI merge cue - sdk-integration.yml unchanged (already correct) Also via API (not in this commit): - Branch protection: PR + 1 review, enforce_admins, required checks - Secrets added: GOVIND_GITHUB_TOKEN, ARGUS_CUEAPI_KEY Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent e661bbd commit 04fc86e

3 files changed

Lines changed: 96 additions & 64 deletions

File tree

.github/workflows/argus-qa.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
name: Feature PR to Main
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
11+
services:
12+
postgres:
13+
image: postgres:15-alpine
14+
env:
15+
POSTGRES_DB: cueapi_test
16+
POSTGRES_USER: runner
17+
POSTGRES_PASSWORD: ""
18+
POSTGRES_HOST_AUTH_METHOD: trust
19+
ports:
20+
- 5432:5432
21+
options: >-
22+
--health-cmd pg_isready
23+
--health-interval 2s
24+
--health-timeout 3s
25+
--health-retries 10
26+
27+
redis:
28+
image: redis:7-alpine
29+
ports:
30+
- 6379:6379
31+
options: >-
32+
--health-cmd "redis-cli ping"
33+
--health-interval 2s
34+
--health-timeout 3s
35+
--health-retries 10
36+
37+
steps:
38+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.7
39+
40+
- name: Checkout cueapi-core
41+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.7
42+
with:
43+
repository: cueapi/cueapi-core
44+
path: cueapi-core
45+
token: ${{ secrets.GITHUB_TOKEN }}
46+
47+
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.3.0
48+
with:
49+
python-version: '3.12'
50+
51+
- name: Install dependencies
52+
run: |
53+
pip install -r cueapi-core/requirements.txt
54+
pip install -e .
55+
56+
- name: Run tests
57+
env:
58+
DATABASE_URL: postgresql+asyncpg://runner@localhost:5432/cueapi_test
59+
REDIS_URL: redis://localhost:6379
60+
SESSION_SECRET: test-session-secret-32-chars-minimum!!
61+
ENV: test
62+
RESEND_API_KEY: ""
63+
run: pytest tests/ -v --tb=short
64+
65+
auto-merge:
66+
needs: test
67+
runs-on: ubuntu-latest
68+
steps:
69+
- name: Auto-merge PR
70+
run: gh pr merge ${{ github.event.pull_request.number }} --squash --auto
71+
env:
72+
GH_TOKEN: ${{ secrets.GOVIND_GITHUB_TOKEN }}
73+
GH_REPO: ${{ github.repository }}
74+
75+
notify-merge:
76+
needs: auto-merge
77+
runs-on: ubuntu-latest
78+
steps:
79+
- name: Create merge confirmation cue
80+
run: |
81+
FIRE_AT=$(date -u -d '+2 minutes' '+%Y-%m-%dT%H:%M:%SZ' 2>/dev/null || \
82+
date -u -v+2M '+%Y-%m-%dT%H:%M:%SZ')
83+
curl -s -w "\n%{http_code}" -X POST https://api.cueapi.ai/v1/cues \
84+
-H "Authorization: Bearer ${{ secrets.ARGUS_CUEAPI_KEY }}" \
85+
-H "Content-Type: application/json" \
86+
-d "{
87+
\"name\": \"cueapi-python-merged-${{ github.event.pull_request.number }}\",
88+
\"schedule\": {\"type\": \"once\", \"at\": \"${FIRE_AT}\"},
89+
\"transport\": \"worker\",
90+
\"payload\": {
91+
\"task\": \"verify-github-merge\",
92+
\"repo\": \"cueapi/cueapi-python\",
93+
\"pr_number\": \"${{ github.event.pull_request.number }}\",
94+
\"commit_sha\": \"${{ github.event.pull_request.head.sha }}\"
95+
}
96+
}"

.github/workflows/staging-integration.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)