add ragstack docker image #10
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: RAGStack tests | |
on: | |
pull_request: | |
branches: | |
- ragstack-main | |
paths: | |
- ".github/workflows/**" | |
- "ragstack/poetry.lock" | |
- "ragstack/pyproject.toml" | |
- "ragstack/tests/**" | |
env: | |
POETRY_VERSION: "1.8.2" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.11 + Poetry ${{ env.POETRY_VERSION }} | |
uses: "./.github/actions/poetry_caching" | |
with: | |
python-version: 3.11 | |
poetry-version: ${{ env.POETRY_VERSION }} | |
cache-key: ${{ runner.os }}-poetry-${{ env.POETRY_VERSION }}-${{ hashFiles('ragstack/poetry.lock') }} | |
- name: Install Python dependencies | |
run: | | |
poetry env use 3.11 | |
poetry install | |
working-directory: ragstack/libs/core | |
- name: Lint check | |
run: | | |
make lint | |
working-directory: ragstack/libs/core | |
- uses: nicoloboschi/setup-astradb@v1 | |
timeout-minutes: 10 | |
id: astra | |
with: | |
token: ${{ secrets.TESTS_ASTRA_DEV_DB_TOKEN }} | |
region: us-east-2 | |
cloud: aws | |
- name: Run all tests | |
env: | |
ASTRA_DB_API_ENDPOINT: ${{ steps.astra.outputs.api-endpoint }} | |
ASTRA_DB_APPLICATION_TOKEN: ${{ secrets.TESTS_ASTRA_DEV_DB_TOKEN }} | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
run: | | |
make test | |
working-directory: ragstack/libs/core | |
- uses: nicoloboschi/cleanup-astradb@v1 | |
if: ${{ always() && steps.astra.outputs.name != '' }} | |
with: | |
token: ${{ secrets.TESTS_ASTRA_DEV_DB_TOKEN }} | |
name: ${{ steps.astra.outputs.name }} | |
wait: false |