From 1746184e46759d1312da3d61a01aa76a48301d21 Mon Sep 17 00:00:00 2001 From: Christopher Gerber Date: Mon, 18 Nov 2024 14:22:27 -0800 Subject: [PATCH] first pass implementing twitter langchain gha unit tests --- .github/workflows/unit_tests.yml | 38 ++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index 96763bc7f..bef2bb7ff 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -77,3 +77,41 @@ jobs: - name: Run tests run: poetry run make test + + test-twitter-langchain: + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./twitter-langchain + strategy: + matrix: + python: ['3.10', '3.11', '3.12'] + + steps: + - uses: actions/checkout@v3 + + - name: Set up Python ${{ matrix.python }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python }} + + - name: Install Poetry + uses: snok/install-poetry@v1 + with: + version: latest + virtualenvs-create: true + virtualenvs-in-project: true + + - name: Load cached venv + id: cached-poetry-dependencies + uses: actions/cache@v3 + with: + path: ./twitter-langchain/.venv + key: venv-twitter-langchain-${{ runner.os }}-${{ matrix.python }}-${{ hashFiles('cdp-twitter-langchain/poetry.lock') }} + + - name: Install dependencies + if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' + run: poetry install --with dev + + - name: Run tests + run: poetry run make test