Skip to content

Commit

Permalink
remove explicit cache prune and surface tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
eavanvalkenburg committed Nov 28, 2024
1 parent e376d83 commit 280b798
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 62 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
cache-suffix: ${{ runner.os }}-${{ matrix.python-version }}
- name: Check version
run: |
echo "Building and uploading Python package version: ${{ github.event.release.tag_name }}"
echo "Building and uploading Python package version: ${{ github.event.release.tag_name }}"
- name: Build the package
run: cd python && make build
- name: Release
Expand Down
77 changes: 28 additions & 49 deletions .github/workflows/python-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,18 +160,7 @@ jobs:
timeout-minutes: 25
shell: bash
run: |
uv run pytest -n logical --dist loadfile --dist worksteal -v --junitxml=pytest-completions.xml ./tests/integration/completions ./tests/integration/embeddings ./tests/samples ./tests/integration/cross_language
- name: Surface failing tests
if: always()
uses: pmeier/pytest-results-action@main
with:
path: python/pytest-completions.xml
summary: true
display-options: fEX
fail-on-empty: true
title: Test results
- name: Minimize uv cache
run: uv cache prune --ci
uv run pytest -v -n logical --dist loadfile --dist worksteal ./tests/integration/completions ./tests/integration/embeddings ./tests/samples ./tests/integration/cross_language
python-merge-gate-memory:
name: Python Pre-Merge Integration Tests - Memory (incl samples using those)
Expand Down Expand Up @@ -228,18 +217,7 @@ jobs:
timeout-minutes: 10
shell: bash
run: |
uv run pytest -n logical --dist loadfile --dist worksteal -v --junitxml=pytest-memory.xml ./tests/integration/memory ./tests/samples
- name: Surface failing tests
if: always()
uses: pmeier/pytest-results-action@main
with:
path: python/pytest-memory.xml
summary: true
display-options: fEX
fail-on-empty: true
title: Test results
- name: Minimize uv cache
run: uv cache prune --ci
uv run pytest -v -n logical --dist loadfile --dist worksteal ./tests/integration/memory ./tests/samples
python-integration-tests:
name: Python Integration Tests - Scheduled run
Expand All @@ -260,6 +238,20 @@ jobs:
UV_PYTHON: ${{ matrix.python-version }}
MEMORY_CONCEPT_SAMPLE: "true"
COMPLETIONS_CONCEPT_SAMPLE: "true"
# Service containers to run with for the memory connectors, this only works on Ubuntu
services:
# Label used to access the service container
redis:
# Docker Hub image
image: redis/redis-stack-server:latest
ports:
# Opens tcp port 6379 on the host and service container
- 6379:6379
weaviate:
image: cr.weaviate.io/semitechnologies/weaviate:1.26.6
ports:
- 8080:8080
- 50051:50051
steps:
- uses: actions/checkout@v4
- name: Set up uv
Expand Down Expand Up @@ -299,12 +291,6 @@ jobs:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ vars.AWS_REGION }}
- name: Setup Redis Stack Server
if: matrix.os == 'ubuntu-latest'
run: docker run -d --name redis-stack-server -p 6379:6379 redis/redis-stack-server:latest
- name: Setup Weaviate docker deployment
if: matrix.os == 'ubuntu-latest'
run: docker run -d -p 8080:8080 -p 50051:50051 cr.weaviate.io/semitechnologies/weaviate:1.26.6
- name: Start Azure Cosmos DB emulator
if: matrix.os == 'windows-latest'
run: |
Expand All @@ -323,48 +309,36 @@ jobs:
timeout-minutes: 10
shell: bash
run: |
uv run pytest -n logical --dist loadfile --dist worksteal ./tests/integration/completions -v --junitxml=pytest-completions.xml
uv run pytest -v -n logical --dist loadfile --dist worksteal ./tests/integration/completions
- name: Run Integration Tests - Embeddings
id: run_tests_embeddings
timeout-minutes: 5
shell: bash
run: |
uv run pytest -n logical --dist loadfile --dist worksteal ./tests/integration/embeddings -v --junitxml=pytest-embeddings.xml
uv run pytest -v -n logical --dist loadfile --dist worksteal ./tests/integration/embeddings
- name: Run Integration Tests - Memory
id: run_tests_memory
timeout-minutes: 5
shell: bash
run: |
uv run pytest -n logical --dist loadfile --dist worksteal ./tests/integration/memory -v --junitxml=pytest-memory.xml
- name: Run Integration Tests - Cross Language
uv run pytest -v -n logical --dist loadfile --dist worksteal ./tests/integration/memory
id: run_tests_cross_language
timeout-minutes: 5
shell: bash
run: |
uv run pytest -n logical --dist loadfile --dist worksteal ./tests/integration/cross_language -v --junitxml=pytest-cross.xml
uv run pytest -v -n logical --dist loadfile --dist worksteal ./tests/integration/cross_language
- name: Run Integration Tests - Planning
id: run_tests_planning
timeout-minutes: 5
shell: bash
run: |
uv run pytest -n logical --dist loadfile --dist worksteal ./tests/integration/planning -v --junitxml=pytest-planning.xml
uv run pytest -v -n logical --dist loadfile --dist worksteal ./tests/integration/planning
- name: Run Integration Tests - Samples
id: run_tests_samples
timeout-minutes: 5
shell: bash
run: |
uv run pytest -n logical --dist loadfile --dist worksteal ./tests/samples -v --junitxml=pytest-samples.xml
- name: Surface failing tests
if: always()
uses: pmeier/pytest-results-action@main
with:
path: python/pytest-*.xml
summary: true
display-options: fEX
fail-on-empty: true
title: Test results
- name: Minimize uv cache
run: uv cache prune --ci
uv run pytest -v -n logical --dist loadfile --dist worksteal ./tests/samples
# This final job is required to satisfy the merge queue. It must only run (or succeed) if no tests failed
python-integration-tests-check:
Expand All @@ -373,7 +347,12 @@ jobs:
strategy:
max-parallel: 1
fail-fast: false
needs: [python-merge-gate-ai-services, python-merge-gate-memory, python-integration-tests]
needs:
[
python-merge-gate-ai-services,
python-merge-gate-memory,
python-integration-tests,
]
steps:
- name: Get Date
shell: bash
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/python-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ name: Python Code Quality Checks
on:
workflow_dispatch:
pull_request:
branches: [ "main", "feature*" ]
branches: ["main", "feature*"]
paths:
- 'python/**'
- "python/**"

jobs:
pre-commit:
if: '!cancelled()'
if: "!cancelled()"
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -38,5 +38,3 @@ jobs:
extra_args: --config python/.pre-commit-config.yaml --all-files
- name: Run Mypy
run: uv run mypy -p semantic_kernel --config-file mypy.ini
- name: Minimize uv cache
run: uv cache prune --ci
10 changes: 3 additions & 7 deletions .github/workflows/python-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ jobs:
display-options: fEX
fail-on-empty: true
title: Test results
- name: Minimize uv cache
run: uv cache prune --ci
python-test-coverage:
name: Python Test Coverage
runs-on: [ubuntu-latest]
Expand All @@ -80,15 +78,15 @@ jobs:
- name: Setup filename variables
run: echo "FILE_ID=${{ github.event.number }}" >> $GITHUB_ENV
- name: Set up uv
uses: astral-sh/setup-uv@v3
uses: astral-sh/setup-uv@v4
with:
version: "0.5.2"
version: "0.5.x"
enable-cache: true
cache-suffix: ${{ runner.os }}-${{ env.UV_PYTHON }}
- name: Install the project
run: uv sync --all-extras --dev
- name: Test with pytest
run: uv run --frozen pytest -q --junitxml=pytest.xml --cov=semantic_kernel --cov-report=term-missing:skip-covered ./tests/unit | tee python-coverage.txt
run: uv run --frozen pytest -q --junitxml=pytest.xml --cov=semantic_kernel --cov-report=term-missing:skip-covered ./tests/unit | tee python-coverage.txt
- name: Upload coverage
if: always()
uses: actions/upload-artifact@v4
Expand All @@ -105,5 +103,3 @@ jobs:
path: python/pytest.xml
overwrite: true
retention-days: 1
- name: Minimize uv cache
run: uv cache prune --ci

0 comments on commit 280b798

Please sign in to comment.