From 9d364d76823bcc1edda84f08bc95b2f5f4e4268e Mon Sep 17 00:00:00 2001 From: aryansharma28 Date: Mon, 22 Dec 2025 15:07:19 +0100 Subject: [PATCH] Add GitHub Actions workflow for scenario tests --- .github/workflows/test.yml | 47 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..427df5d --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,47 @@ +name: Run Scenario Tests + +on: + pull_request: + branches: + - main + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '22' + + - name: Setup pnpm + uses: pnpm/action-setup@v4 + with: + version: 10.26.0 + + - name: Get pnpm store directory + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + + - name: Setup pnpm cache + uses: actions/cache@v4 + with: + path: ${{ env.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Run scenario tests + env: + OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} + LANGWATCH_API_KEY: ${{ secrets.LANGWATCH_API_KEY }} + DATABASE_URL: ${{ secrets.DATABASE_URL }} + run: pnpm test:scenarios