Skip to content

Commit

Permalink
update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasht86 committed Nov 22, 2024
1 parent a593a35 commit 084f478
Showing 1 changed file with 66 additions and 15 deletions.
81 changes: 66 additions & 15 deletions .github/workflows/integration-cloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
push:
branches:
- master
- thomasht86/fix-integrationtest-vectorsearch
schedule:
- cron: "0 11 * * 0"

Expand All @@ -13,20 +14,58 @@ concurrency:
cancel-in-progress: false

jobs:
setup-environment:
runs-on: ubuntu-latest
outputs:
python-cache-key: ${{ steps.cache-python.outputs.cache-hit }}
steps:
- uses: actions/checkout@v4

- name: Set up Python
id: setup-python
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Cache dependencies
id: cache-python
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml') }}

- name: Install dependencies
if: steps.cache-python.outputs.cache-hit != 'true'
run: |
pip install -e .[dev]
- name: Upload Python environment
uses: actions/upload-artifact@v3
with:
name: python-environment
path: ~/.cache/pip

integration-cloud:
runs-on: ubuntu-latest
needs: setup-environment
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.9"
cache: "pip"
cache-dependency-path: |
pyproject.toml
python-version: "3.10"

- name: Download Python environment
uses: actions/download-artifact@v3
with:
name: python-environment
path: ~/.cache/pip

- name: Install dependencies
run: |
pip install -e .[dev]
- name: Run integration tests
env:
VESPA_TEAM_API_KEY: ${{ secrets.VESPA_TEAM_API_KEY }}
Expand All @@ -35,42 +74,54 @@ jobs:
integration-cloud-token:
runs-on: ubuntu-latest
needs: integration-cloud
needs: setup-environment
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.9"
cache: "pip"
cache-dependency-path: |
pyproject.toml
python-version: "3.10"

- name: Download Python environment
uses: actions/download-artifact@v3
with:
name: python-environment
path: ~/.cache/pip

- name: Install dependencies
run: |
pip install -e .[dev]
- name: Run integration tests
env:
VESPA_TEAM_API_KEY: ${{ secrets.VESPA_TEAM_API_KEY }}
VESPA_CLOUD_SECRET_TOKEN: ${{ secrets.VESPA_CLOUD_SECRET_TOKEN }}
VESPA_CLIENT_TOKEN_ID: ${{ secrets.VESPA_CLIENT_TOKEN_ID}}
VESPA_CLIENT_TOKEN_ID: ${{ secrets.VESPA_CLIENT_TOKEN_ID }}
run: |
pytest tests/integration/test_integration_vespa_cloud_token.py -s -v
integration-cloud-vector-search:
runs-on: ubuntu-latest
needs: integration-cloud-token
needs: setup-environment
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.9"
cache: "pip"
cache-dependency-path: |
pyproject.toml
python-version: "3.10"

- name: Download Python environment
uses: actions/download-artifact@v3
with:
name: python-environment
path: ~/.cache/pip

- name: Install dependencies
run: |
pip install -e .[dev]
- name: Run integration tests
env:
VESPA_TEAM_API_KEY: ${{ secrets.VESPA_TEAM_API_KEY }}
Expand Down

0 comments on commit 084f478

Please sign in to comment.