Migrate CI to protected runners and JFrog PyPI proxy #2249
This file contains hidden or 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: Integration Tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| permissions: | |
| contents: read | |
| id-token: write | |
| jobs: | |
| run-non-telemetry-tests: | |
| runs-on: | |
| group: databricks-protected-runner-group | |
| labels: linux-ubuntu-latest | |
| environment: azure-prod | |
| env: | |
| DATABRICKS_SERVER_HOSTNAME: ${{ secrets.DATABRICKS_HOST }} | |
| DATABRICKS_HTTP_PATH: ${{ secrets.TEST_PECO_WAREHOUSE_HTTP_PATH }} | |
| DATABRICKS_TOKEN: ${{ secrets.DATABRICKS_TOKEN }} | |
| DATABRICKS_CATALOG: peco | |
| DATABRICKS_USER: ${{ secrets.TEST_PECO_SP_ID }} | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - name: Setup JFrog | |
| uses: ./.github/actions/setup-jfrog | |
| - name: Set up python | |
| id: setup-python | |
| uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 | |
| with: | |
| python-version: "3.10" | |
| - name: Install Poetry | |
| run: | | |
| pip install poetry==2.2.1 | |
| poetry config virtualenvs.create true | |
| poetry config virtualenvs.in-project true | |
| poetry config installer.parallel true | |
| - name: Configure Poetry for JFrog | |
| run: | | |
| poetry config repositories.jfrog https://databricks.jfrog.io/artifactory/api/pypi/db-pypi/simple | |
| poetry config http-basic.jfrog gha-service-account "${JFROG_ACCESS_TOKEN}" | |
| poetry source add --priority=primary jfrog https://databricks.jfrog.io/artifactory/api/pypi/db-pypi/simple | |
| poetry lock | |
| - name: Load cached venv | |
| id: cached-poetry-dependencies | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 | |
| with: | |
| path: .venv | |
| key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ github.event.repository.name }}-${{ hashFiles('**/poetry.lock') }} | |
| - name: Install Kerberos system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libkrb5-dev | |
| - name: Install dependencies | |
| run: poetry install --no-interaction --all-extras | |
| - name: Run non-telemetry e2e tests | |
| run: | | |
| poetry run python -m pytest tests/e2e \ | |
| --ignore=tests/e2e/test_telemetry_e2e.py \ | |
| --ignore=tests/e2e/test_concurrent_telemetry.py \ | |
| -n auto | |
| run-telemetry-tests: | |
| runs-on: | |
| group: databricks-protected-runner-group | |
| labels: linux-ubuntu-latest | |
| needs: run-non-telemetry-tests | |
| environment: azure-prod | |
| env: | |
| DATABRICKS_SERVER_HOSTNAME: ${{ secrets.DATABRICKS_HOST }} | |
| DATABRICKS_HTTP_PATH: ${{ secrets.TEST_PECO_WAREHOUSE_HTTP_PATH }} | |
| DATABRICKS_TOKEN: ${{ secrets.DATABRICKS_TOKEN }} | |
| DATABRICKS_CATALOG: peco | |
| DATABRICKS_USER: ${{ secrets.TEST_PECO_SP_ID }} | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - name: Setup JFrog | |
| uses: ./.github/actions/setup-jfrog | |
| - name: Set up python | |
| id: setup-python | |
| uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 | |
| with: | |
| python-version: "3.10" | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libkrb5-dev | |
| - name: Install Poetry | |
| run: | | |
| pip install poetry==2.2.1 | |
| poetry config virtualenvs.create true | |
| poetry config virtualenvs.in-project true | |
| poetry config installer.parallel true | |
| - name: Configure Poetry for JFrog | |
| run: | | |
| poetry config repositories.jfrog https://databricks.jfrog.io/artifactory/api/pypi/db-pypi/simple | |
| poetry config http-basic.jfrog gha-service-account "${JFROG_ACCESS_TOKEN}" | |
| poetry source add --priority=primary jfrog https://databricks.jfrog.io/artifactory/api/pypi/db-pypi/simple | |
| poetry lock | |
| - name: Load cached venv | |
| id: cached-poetry-dependencies | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 | |
| with: | |
| path: .venv | |
| key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ github.event.repository.name }}-${{ hashFiles('**/poetry.lock') }} | |
| - name: Install dependencies | |
| run: poetry install --no-interaction --all-extras | |
| - name: Run telemetry tests in isolation | |
| run: | | |
| poetry run python -m pytest tests/e2e/test_concurrent_telemetry.py \ | |
| -n auto --dist=loadgroup -v |