Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.full.yml up -d --build | |
- name: Wait for DB to be ready | |
uses: vishnudxb/wait-for-port@v1 | |
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 |