ci: add astra integration tests to CI (#2643)
* Add astra integration tests to CI * Add astra integration tests to CI * revert whitespace changes * update filter * Swap to using a scheduled job rather than filter
This commit is contained in:
parent
23874b81ed
commit
ae3439c40b
4 changed files with 75 additions and 18 deletions
15
.github/changes-filter.yaml
vendored
Normal file
15
.github/changes-filter.yaml
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
# https://github.com/dorny/paths-filter
|
||||||
|
python:
|
||||||
|
- "src/backend/**"
|
||||||
|
- "src/backend/**.py"
|
||||||
|
- "pyproject.toml"
|
||||||
|
- "poetry.lock"
|
||||||
|
- "**/python_test.yml"
|
||||||
|
tests:
|
||||||
|
- "tests/**"
|
||||||
|
- "src/frontend/tests/**"
|
||||||
|
frontend:
|
||||||
|
- "src/frontend/**"
|
||||||
|
- "**/typescript_test.yml"
|
||||||
|
docs:
|
||||||
|
- "docs/**"
|
||||||
18
.github/workflows/ci.yml
vendored
18
.github/workflows/ci.yml
vendored
|
|
@ -18,8 +18,6 @@ on:
|
||||||
type: string
|
type: string
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
@ -42,21 +40,7 @@ jobs:
|
||||||
id: filter
|
id: filter
|
||||||
uses: dorny/paths-filter@v3
|
uses: dorny/paths-filter@v3
|
||||||
with:
|
with:
|
||||||
filters: |
|
filters: ./.github/changes-filter.yaml
|
||||||
python:
|
|
||||||
- "src/backend/**"
|
|
||||||
- "src/backend/**.py"
|
|
||||||
- "pyproject.toml"
|
|
||||||
- "poetry.lock"
|
|
||||||
- "**/python_test.yml"
|
|
||||||
tests:
|
|
||||||
- "tests/**"
|
|
||||||
- "src/frontend/tests/**"
|
|
||||||
frontend:
|
|
||||||
- "src/frontend/**"
|
|
||||||
- "**/typescript_test.yml"
|
|
||||||
docs:
|
|
||||||
- "docs/**"
|
|
||||||
|
|
||||||
test-backend:
|
test-backend:
|
||||||
needs: path-filter
|
needs: path-filter
|
||||||
|
|
|
||||||
1
.github/workflows/python_test.yml
vendored
1
.github/workflows/python_test.yml
vendored
|
|
@ -11,7 +11,6 @@ on:
|
||||||
env:
|
env:
|
||||||
POETRY_VERSION: "1.8.2"
|
POETRY_VERSION: "1.8.2"
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Run Unit Tests
|
name: Run Unit Tests
|
||||||
|
|
|
||||||
59
.github/workflows/scheduled_integration_test.yml
vendored
Normal file
59
.github/workflows/scheduled_integration_test.yml
vendored
Normal file
|
|
@ -0,0 +1,59 @@
|
||||||
|
name: Integration tests
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
branch:
|
||||||
|
description: "(Optional) Branch to checkout"
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
schedule:
|
||||||
|
- cron: "0 0 */2 * *" # Run every 2 days
|
||||||
|
|
||||||
|
env:
|
||||||
|
POETRY_VERSION: "1.8.2"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
setup-environment:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
python-version:
|
||||||
|
- "3.12"
|
||||||
|
- "3.11"
|
||||||
|
- "3.10"
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: ${{ inputs.branch || github.ref }}
|
||||||
|
- name: Set up Python ${{ matrix.python-version }} + Poetry ${{ env.POETRY_VERSION }}
|
||||||
|
uses: "./.github/actions/poetry_caching"
|
||||||
|
with:
|
||||||
|
python-version: ${{ matrix.python-version }}
|
||||||
|
poetry-version: ${{ env.POETRY_VERSION }}
|
||||||
|
cache-key: ${{ runner.os }}-poetry-${{ env.POETRY_VERSION }}-${{ hashFiles('**/poetry.lock') }}
|
||||||
|
- name: Install Python dependencies
|
||||||
|
run: |
|
||||||
|
poetry env use ${{ matrix.python-version }}
|
||||||
|
poetry install
|
||||||
|
|
||||||
|
test-integration:
|
||||||
|
needs: setup-environment
|
||||||
|
name: Run Integration Tests
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
python-version:
|
||||||
|
- "3.12"
|
||||||
|
- "3.11"
|
||||||
|
- "3.10"
|
||||||
|
env:
|
||||||
|
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
||||||
|
ASTRA_DB_API_KEY: ${{ secrets.ASTRA_DB_API_KEY }}
|
||||||
|
ASTRA_DB_APPLICATION_TOKEN: ${{ secrets.ASTRA_DB_APPLICATION_TOKEN }}
|
||||||
|
steps:
|
||||||
|
- name: Run integration tests
|
||||||
|
timeout-minutes: 12
|
||||||
|
run: |
|
||||||
|
make integration_tests
|
||||||
Loading…
Add table
Add a link
Reference in a new issue