Skip to content

Commit

Permalink
stop using docker
Browse files Browse the repository at this point in the history
  • Loading branch information
aarushik93 committed Apr 19, 2024
1 parent 4cc9ee8 commit 7cb5397
Showing 1 changed file with 25 additions and 12 deletions.
37 changes: 25 additions & 12 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
image: ankane/pgvector:latest
env:
POSTGRES_USER: ${{ secrets.DB_USER }}
PGUSER: ${{ secrets.DB_USER }}
POSTGRES_PASSWORD: ${{ secrets.DB_PASS }}
POSTGRES_DB: ${{ secrets.DB_NAME }}
ports:
Expand All @@ -25,12 +26,32 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Set up Docker
uses: docker/setup-buildx-action@v2
- name: Set up Python 3.11
uses: actions/setup-python@v1
with:
python-version: 3.11

- name: Set up Python dependency cache
uses: actions/cache@v4
with:
path: ~/.cache/pypoetry
key: ${{ runner.os }}-poetry-${{ hashFiles('pyproject.toml') }}-${{ steps.get_date.outputs.date }}

- name: Build Docker Image for Codex
- name: Install Python dependencies
run: |
docker build -t codex -f Dockerfile .
curl -sSL https://install.python-poetry.org | python3 -
poetry install
- name: Install Dependencies
run: poetry install
if: steps.cache.outputs.cache-hit != 'true'

- name: Generate Prisma Client
run: poetry run prisma generate

- name: Run server
run: |
./run serve
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
DB_USER: ${{ secrets.DB_USER }}
Expand All @@ -44,21 +65,13 @@ jobs:
RUN_ENV: ci
PORT: 8080

- name: Run Codex Container
run: |
docker run -d --name codex --link postgres:db -p 8080:8000 codex
- name: Wait for PostgreSQL
uses: MaximeGoyette/wait-for-it-action@master
with:
host: postgres
port: 5432
timeout: 30

- name: Install dependencies
run: |
poetry install
- name: Run Database Migrations
run: |
poetry run prisma migrate dev --name updates
Expand Down

0 comments on commit 7cb5397

Please sign in to comment.