Skip to content

chore: use smaller chunks #589

chore: use smaller chunks

chore: use smaller chunks #589

name: Integration Test
on:
pull_request_target:
types: [ labeled, opened, synchronize, reopened, ready_for_review ]
branches:
- "main"
- "release-**"
paths-ignore:
- "docs/**"
- "**.md"
- CODEOWNERS
- LICENSE
- "LICENSES/**"
- ".reuse/**"
- "config/**"
- "data/**"
- "doc_indexer/**"
- "scripts/**"
jobs:
integration-test:
if: contains(github.event.pull_request.labels.*.name, 'run-integration-test')
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Extract Python version
id: python-version
run: ./scripts/shell/extract-python-version.sh
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Install dependencies
run: poetry install --with dev
- name: Prepare test configurations
id: int-tests-configs
env:
AICORE_SECRET: ${{ secrets.AICORE_SECRET }}
HANA_DB_SECRET: ${{ secrets.HANA_DB }}
run: |
echo "${AICORE_SECRET}" | base64 -d > aicore-secret.yaml
echo "AICORE_CLIENT_ID=$(yq eval '.stringData.clientid' aicore-secret.yaml)" >> $GITHUB_OUTPUT
echo "AICORE_CLIENT_SECRET=$(yq eval '.stringData.clientsecret' aicore-secret.yaml)" >> $GITHUB_OUTPUT
echo "AICORE_AUTH_URL=$(yq eval '.stringData.auth_url' aicore-secret.yaml)" >> $GITHUB_OUTPUT
echo "AICORE_BASE_URL=$(yq eval '.stringData.base_url' aicore-secret.yaml)" >> $GITHUB_OUTPUT
echo "AICORE_RESOURCE_GROUP=$(yq eval '.stringData.resource_group' aicore-secret.yaml)" >> $GITHUB_OUTPUT
# Extract HANA DB credentials - updated key names
echo "${HANA_DB_SECRET}" > hana-db-secret.yaml
echo "DATABASE_URL=$(yq eval '.DATABASE_URL' hana-db-secret.yaml)" >> $GITHUB_OUTPUT
echo "DATABASE_USER=$(yq eval '.DATABASE_USER' hana-db-secret.yaml)" >> $GITHUB_OUTPUT
echo "DATABASE_PASSWORD=$(yq eval '.DATABASE_PASSWORD' hana-db-secret.yaml)" >> $GITHUB_OUTPUT
echo "DATABASE_PORT=$(yq eval '.DATABASE_PORT' hana-db-secret.yaml)" >> $GITHUB_OUTPUT
echo "DOCS_TABLE_NAME=$(yq eval '.DOCS_TABLE_NAME' hana-db-secret.yaml)" >> $GITHUB_OUTPUT
# cleanup
rm -f aicore-secret.yaml hana-db-secret.yaml
- name: Run integration tests
env:
LOG_LEVEL: "DEBUG"
# AI Core configurations.
AICORE_CLIENT_ID: ${{ steps.int-tests-configs.outputs.AICORE_CLIENT_ID }}
AICORE_CLIENT_SECRET: ${{ steps.int-tests-configs.outputs.AICORE_CLIENT_SECRET }}
AICORE_AUTH_URL: ${{ steps.int-tests-configs.outputs.AICORE_AUTH_URL }}
AICORE_BASE_URL: ${{ steps.int-tests-configs.outputs.AICORE_BASE_URL }}
AICORE_RESOURCE_GROUP: ${{ steps.int-tests-configs.outputs.AICORE_RESOURCE_GROUP }}
# Gardener test cluster configurations.
TEST_CLUSTER_URL: ${{ secrets.GARDENER_TEST_CLUSTER_URL }}
TEST_CLUSTER_CA_DATA: ${{ secrets.GARDENER_TEST_CLUSTER_CA_DATA }}
TEST_CLUSTER_AUTH_TOKEN: ${{ secrets.GARDENER_TEST_CLUSTER_AUTH_TOKEN }}
# HANA DB configurations
DATABASE_URL: ${{ steps.int-tests-configs.outputs.DATABASE_URL }}
DATABASE_USER: ${{ steps.int-tests-configs.outputs.DATABASE_USER }}
DATABASE_PASSWORD: ${{ steps.int-tests-configs.outputs.DATABASE_PASSWORD }}
DATABASE_PORT: ${{ steps.int-tests-configs.outputs.DATABASE_PORT }}
DOCS_TABLE_NAME: ${{ steps.int-tests-configs.outputs.DOCS_TABLE_NAME }}
run: |
echo "${{ secrets.MODELS }}" > config/config.yml
echo "${{ secrets.MODELS_JSON }}" | base64 --decode | jq > $GITHUB_WORKSPACE/config/config.json
poetry run poe test-integration