Skip to content

new file

new file #4

Workflow file for this run

name: Benchmarks Workflow
on:
push:
branches:
- benchmarks-ci
# pull_request:
# branches:
# - main
jobs:
build-and-test:
runs-on: ubuntu-latest
services:
postgres:
image: ankane/pgvector:latest
env:
POSTGRES_USER: ${{ secrets.DB_USER }}
POSTGRES_PASSWORD: ${{ secrets.DB_PASS }}
POSTGRES_DB: ${{ secrets.DB_NAME }}
ports:
- 5432:5432
options: >-

Check failure on line 24 in .github/workflows/benchmarks.yml

View workflow run for this annotation

GitHub Actions / Benchmarks Workflow

Invalid workflow file

The workflow is not valid. .github/workflows/benchmarks.yml (Line: 24, Col: 18): Unrecognized named-value: 'secrets'. Located at position 1 within expression: secrets.DB_USER
--health-cmd "pg_isready -U ${{ secrets.DB_USER }} -d ${{ secrets.DB_NAME }}"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v3
- name: Set up Docker
uses: docker/setup-buildx-action@v2
- name: Build Docker Image for Codex
run: |
docker build -t codex -f Dockerfile .
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
DB_USER: ${{ secrets.DB_USER }}
DB_PASS: ${{ secrets.DB_PASS }}
DB_NAME: ${{ secrets.DB_NAME }}
GIT_TOKEN: ${{ secrets.GIT_TOKEN }}
USER_DB_ADMIN: ${{ secrets.USER_DB_ADMIN }}
USER_DB_PASS: ${{ secrets.USER_DB_PASS }}
USER_DB_HOST: ${{ secrets.USER_DB_HOST }}
DB_PORT: 5432
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
- name: Populate Database
run: |
./run populate-db
- name: Run Tests
run: |
./run benchmark
- name: Clean up
if: always()
run: |
docker stop codex
docker rm codex
env:
DB_USER: ${{ secrets.DB_USER }}
DB_PASS: ${{ secrets.DB_PASS }}
DB_NAME: ${{ secrets.DB_NAME }}
DB_PORT: 5432
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
RUN_ENV: ci
PORT: 8080