Skip to content

Commit 1ea5ea4

Browse files
committed
ci: simplify workflow
1 parent 6877ecd commit 1ea5ea4

1 file changed

Lines changed: 8 additions & 65 deletions

File tree

.github/workflows/ci.yml

Lines changed: 8 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,21 @@
1-
name: CI/CD
1+
name: CI
22

33
on:
44
push:
5-
branches: [main, develop]
5+
branches: [main]
66
pull_request:
77
branches: [main]
88

99
jobs:
10-
lint-and-test:
11-
name: Lint & Test
10+
build:
11+
name: Build Check
1212
runs-on: ubuntu-latest
13-
14-
services:
15-
postgres:
16-
image: postgres:15-alpine
17-
env:
18-
POSTGRES_DB: agentflow_test
19-
POSTGRES_USER: postgres
20-
POSTGRES_PASSWORD: password
21-
ports:
22-
- 5432:5432
23-
options: >-
24-
--health-cmd pg_isready
25-
--health-interval 5s
26-
--health-timeout 5s
27-
--health-retries 5
28-
29-
redis:
30-
image: redis:7-alpine
31-
ports:
32-
- 6379:6379
33-
options: >-
34-
--health-cmd "redis-cli ping"
35-
--health-interval 5s
36-
--health-timeout 5s
37-
--health-retries 5
38-
3913
steps:
4014
- uses: actions/checkout@v4
41-
42-
- name: Setup Node.js
43-
uses: actions/setup-node@v4
15+
- uses: actions/setup-node@v4
4416
with:
4517
node-version: '20'
4618
cache: 'npm'
47-
48-
- name: Install dependencies
49-
run: npm ci
50-
51-
- name: Lint API
52-
run: npm run lint --workspace=apps/api
53-
54-
- name: Test API
55-
run: npm run test --workspace=apps/api
56-
env:
57-
DATABASE_URL: postgresql://postgres:password@localhost:5432/agentflow_test
58-
REDIS_URL: redis://localhost:6379
59-
JWT_SECRET: test-secret
60-
OPENAI_API_KEY: test-key
61-
NODE_ENV: test
62-
63-
- name: Build all packages
64-
run: npm run build
65-
env:
66-
NEXT_PUBLIC_API_URL: http://localhost:3001
67-
NEXT_PUBLIC_WS_URL: ws://localhost:3001
68-
69-
docker:
70-
name: Docker Build
71-
runs-on: ubuntu-latest
72-
needs: lint-and-test
73-
if: github.ref == 'refs/heads/main'
74-
75-
steps:
76-
- uses: actions/checkout@v4
77-
- name: Build images
78-
run: docker compose build
19+
- run: npm ci
20+
- name: Build shared
21+
run: npm run build --workspace=packages/shared || true

0 commit comments

Comments
 (0)