Skip to content

ci file

ci file #3

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
steps:
- uses: actions/checkout@v3
- name: Set up Docker
uses: docker/setup-buildx-action@v2
- name: Build & Start Services
run: |
docker-compose -f docker-compose.ci.yml up -d --build
- name: Wait for DB to be ready
uses: MaximeGoyette/wait-for-it-action@master
with:
host: localhost
port: 5432
- 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-compose -f docker-compose.full.yml down
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