Skip to content

Commit dc5f9dd

Browse files
authored
Merge pull request #524 from FalkorDB/staging
Staging
2 parents bab0090 + 73ddd82 commit dc5f9dd

140 files changed

Lines changed: 13922 additions & 10139 deletions

File tree

Some content is hidden

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

.env.template

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1-
PORT=<PORT>
2-
HOST=<HOST>
1+
# FalkorDB connection
2+
FALKORDB_HOST=localhost
3+
FALKORDB_PORT=6379
34

5+
# OpenAI API key for LLM features
6+
OPENAI_API_KEY=<YOUR_OPENAI_API_KEY>
7+
8+
# Secret token for API authentication
9+
SECRET_TOKEN=<YOUR_SECRET_TOKEN>
10+
11+
# Flask server settings
12+
FLASK_RUN_HOST=0.0.0.0
13+
FLASK_RUN_PORT=5000
14+
15+
# Set to 1 to enable public access for analyze_repo/switch_commit endpoints
16+
CODE_GRAPH_PUBLIC=0

.eslintrc.json

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

.github/dependabot.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,24 @@ updates:
1414
npm-minor-patch:
1515
update-types:
1616
- "patch"
17-
17+
18+
- package-ecosystem: "github-actions"
19+
directory: "/"
20+
schedule:
21+
interval: "daily"
22+
target-branch: "staging"
23+
groups:
24+
github-actions-minor-patch:
25+
update-types:
26+
- "patch"
27+
28+
- package-ecosystem: "pip"
29+
directory: "/"
30+
schedule:
31+
interval: "daily"
32+
target-branch: "staging"
33+
groups:
34+
pip-minor-patch:
35+
update-types:
36+
- "patch"
37+

.github/workflows/build.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
build:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v6
22+
23+
- name: Setup Node
24+
uses: actions/setup-node@v6
25+
with:
26+
node-version: "24"
27+
cache: "npm"
28+
cache-dependency-path: |
29+
package-lock.json
30+
app/package-lock.json
31+
32+
- name: Install frontend dependencies
33+
working-directory: ./app
34+
run: npm ci
35+
36+
- name: Build frontend
37+
working-directory: ./app
38+
run: npm run build
39+
40+
- name: Lint frontend
41+
working-directory: ./app
42+
run: npm run lint
43+
44+
- name: Setup Python
45+
uses: actions/setup-python@v6
46+
with:
47+
python-version: "3.12"
48+
49+
- name: Install uv
50+
uses: astral-sh/setup-uv@v7
51+
with:
52+
version: "latest"
53+
54+
- name: Install backend dependencies
55+
run: uv sync --extra test
56+
57+
docker-build:
58+
runs-on: ubuntu-latest
59+
steps:
60+
- name: Checkout
61+
uses: actions/checkout@v6
62+
63+
- name: Build Docker image
64+
uses: docker/build-push-action@v7
65+
with:
66+
context: .
67+
file: ./Dockerfile
68+
push: false

.github/workflows/nextjs.yml

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

.github/workflows/playwright.yml

Lines changed: 85 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,17 @@ on:
44
branches: [ main, staging ]
55
pull_request:
66
branches: [ main, staging ]
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
10+
cancel-in-progress: true
11+
712
jobs:
813
test:
914
timeout-minutes: 60
1015
runs-on: ubuntu-latest
16+
env:
17+
PYTHONPATH: ${{ github.workspace }}
1118
strategy:
1219
fail-fast: false
1320
matrix:
@@ -18,39 +25,103 @@ jobs:
1825
ports:
1926
- 6379:6379
2027
steps:
21-
- uses: actions/checkout@v4
22-
- uses: actions/setup-node@v4
28+
- uses: actions/checkout@v6
29+
30+
- uses: actions/setup-node@v6
2331
with:
2432
node-version: 24
25-
- name: Install dependencies
33+
cache: 'npm'
34+
cache-dependency-path: |
35+
package-lock.json
36+
app/package-lock.json
37+
38+
- uses: actions/setup-python@v6
39+
with:
40+
python-version: '3.12'
41+
42+
- name: Install uv
43+
uses: astral-sh/setup-uv@v7
44+
with:
45+
version: "latest"
46+
47+
- name: Install backend dependencies
48+
run: uv sync
49+
50+
- name: Install frontend dependencies
51+
working-directory: ./app
2652
run: npm ci
27-
- name: Install Playwright Browsers
28-
run: npx playwright install --with-deps
29-
- name: Set up environment variables and run tests
53+
54+
- name: Build frontend
55+
working-directory: ./app
56+
env:
57+
VITE_SECRET_TOKEN: ${{ secrets.SECRET_TOKEN }}
58+
run: npm run build
59+
60+
- name: Seed test data into FalkorDB
61+
run: uv run python e2e/seed_test_data.py
62+
63+
- name: Install Playwright npm dependencies
64+
run: |
65+
npm ci
66+
67+
- name: Cache Playwright browsers
68+
id: playwright-cache
69+
uses: actions/cache@v5
70+
with:
71+
path: ~/.cache/ms-playwright
72+
key: playwright-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('package-lock.json') }}
73+
74+
- name: Install Playwright browsers
75+
if: steps.playwright-cache.outputs.cache-hit != 'true'
76+
run: npx playwright install --with-deps chromium firefox
77+
78+
- name: Install Playwright system deps
79+
if: steps.playwright-cache.outputs.cache-hit == 'true'
80+
run: |
81+
npx playwright install chromium firefox
82+
npx playwright install-deps chromium firefox
83+
84+
- name: Start Flask server
85+
id: start-server
3086
env:
31-
FALKORDB_URL: ${{ secrets.FALKORDB_URL }}
3287
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
3388
SECRET_TOKEN: ${{ secrets.SECRET_TOKEN }}
34-
NEXT_PUBLIC_MODE: UNLIMITED
35-
BACKEND_URL: ${{ secrets.BACKEND_URL }}
89+
CODE_GRAPH_PUBLIC: "1"
90+
MODEL_NAME: "openai/gpt-4.1-mini"
3691
run: |
37-
npm install
38-
npm run build
39-
NEXTAUTH_SECRET=SECRET npm start & npx playwright test --shard=${{ matrix.shard }}/2 --reporter=dot,list
92+
uv run flask --app api/index.py run --host 0.0.0.0 --port 5000 &
93+
echo "pid=$!" >> "$GITHUB_OUTPUT"
94+
# Wait for Flask to be ready
95+
timeout 30 bash -c 'until curl -s http://localhost:5000/ > /dev/null 2>&1; do sleep 0.5; done'
96+
97+
- name: Run Playwright tests
98+
env:
99+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
100+
SECRET_TOKEN: ${{ secrets.SECRET_TOKEN }}
101+
CODE_GRAPH_PUBLIC: "1"
102+
MODEL_NAME: "openai/gpt-4.1-mini"
103+
run: npx playwright test --shard=${{ matrix.shard }}/2 --reporter=dot,list
104+
105+
- name: Stop Flask server
106+
if: always()
107+
run: kill ${{ steps.start-server.outputs.pid }} 2>/dev/null || true
108+
40109
- name: Ensure required directories exist
41110
if: always()
42111
run: |
43112
mkdir -p playwright-report
44113
mkdir -p playwright-report/artifacts
45-
- uses: actions/upload-artifact@v4
114+
115+
- uses: actions/upload-artifact@v7
46116
if: always()
47117
with:
48118
name: playwright-report-shard-${{ matrix.shard }}
49119
path: playwright-report/
50120
retention-days: 30
121+
51122
- name: Upload failed test screenshots
52123
if: always()
53-
uses: actions/upload-artifact@v4
124+
uses: actions/upload-artifact@v7
54125
with:
55126
name: failed-test-screenshots-shard-${{ matrix.shard }}
56127
path: playwright-report/artifacts/

.github/workflows/release-image.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,24 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Checkout
15-
uses: actions/checkout@v4
15+
uses: actions/checkout@v6
1616

1717
- name: Set tags
1818
run: |
1919
if ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags') }}; then
20-
echo "TAGS=falkordb/code-graph-frontend:latest,falkordb/code-graph-frontend:${{ github.ref_name }}" >> $GITHUB_ENV
20+
echo "TAGS=falkordb/code-graph:latest,falkordb/code-graph:${{ github.ref_name }}" >> $GITHUB_ENV
2121
else
22-
echo "TAGS=falkordb/code-graph-frontend:edge" >> $GITHUB_ENV
22+
echo "TAGS=falkordb/code-graph:edge" >> $GITHUB_ENV
2323
fi
2424
2525
- name: Login to DockerHub
26-
uses: docker/login-action@v3
26+
uses: docker/login-action@v4
2727
with:
2828
username: ${{ secrets.DOCKER_USERNAME }}
2929
password: ${{ secrets.DOCKER_PASSWORD }}
3030

3131
- name: Build image
32-
uses: docker/build-push-action@v5
32+
uses: docker/build-push-action@v7
3333
with:
3434
context: .
3535
file: ./Dockerfile

0 commit comments

Comments
 (0)