This repository has been archived by the owner on Oct 27, 2023. It is now read-only.
Merge branch 'main' into nicolewhite-patch-1 #43
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: Autoblocks Replays | |
on: push | |
env: | |
POETRY_VERSION: "1.5.1" | |
PYTHON_VERSION: "3.11" | |
jobs: | |
autoblocks-replays: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Python ${{ env.PYTHON_VERSION }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: Install poetry | |
run: curl -sSL https://install.python-poetry.org | python3 - | |
- name: Install dependencies | |
run: poetry install | |
- name: Start the app | |
run: poetry run start & | |
env: | |
# Use the replay ingestion key so that Autoblocks knows we're sending replayed events | |
AUTOBLOCKS_INGESTION_KEY: ${{ secrets.DEMO_AUTOBLOCKS_REPLAY_INGESTION_KEY }} | |
# Any other environment variables the application needs to run | |
OPENAI_API_KEY: ${{ secrets.DEMO_OPENAI_API_KEY }} | |
- name: Wait for the app to be ready | |
run: | | |
while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' http://localhost:5000/health)" != "200" ]]; do sleep 1; done | |
- name: Run static replays | |
run: poetry run replay-static | |
- name: Run dynamic replays | |
run: poetry run replay-dynamic --view-id clkeamsei0001l908cmjjtqrf --num-traces 3 | |
env: | |
# Dynamic replays are fetched from the Autoblocks API | |
AUTOBLOCKS_API_KEY: ${{ secrets.DEMO_AUTOBLOCKS_API_KEY }} |