Skip to content

Commit

Permalink
Benchmarking + Python Bug Fixes + Axum Bump (#60)
Browse files Browse the repository at this point in the history
* cicd: Add dependency.toml files to integrate dependency cascade

* cicd: Isolate Python SDK testing into a separate action

* cicd: Change client tests to use matrix strategy

* chore: Reformat failing file

* fix: CICD typo

* cicd: Change matrix strategy

* fix: Typo in CICD

* cicd: rework all quality jobs to be ran in parallel

* cicd: Isolate test env cleanup into its own action

* cicd: Isolate test env setup into its own action

* chore: Rename python sdk test action

* cicd: Improve documentation for publish jobs

* cicd: Improve docs for quality jobs

* cicd: Remove matrix strategy from CICD tests

* chore: Upgrade dependencies for axum

* chore: add pytest-benchmark as new dev dependency

* chore: Update axum endpoint paths to 0.8

* fix: Fix a bunch of type hinting and import errors

* test: Add new benchmarking tests

* cicd: Add benchmarking suite to testing cicd

* cicd: Create output.json file to store benchmark results

* fix: Missing file path in CICD

* cicd: Add gh-pages creation step

* fix: Pass gh token via input

* fix: Typo

* fix: Config git user for creating branch

* fix: Add gh token to branch commit

* cicd: Test new approach

* fix: Fix permissions errors

* cicd: Disable autopush

* cicd: Add summary

* cicd: remove permissions

* fix: Remove stupid permissions

* fix: Remove gh-pages env

* cicd: Set auto push to true

* cicd: Disable automatic benchmarks

* docs: Add benchmarking how-to
  • Loading branch information
tubarao312 authored Jan 14, 2025
1 parent 0a7785a commit 8735cd4
Show file tree
Hide file tree
Showing 15 changed files with 411 additions and 115 deletions.
64 changes: 64 additions & 0 deletions .github/actions/test_python_sdk/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: 'Python SDK Test Steps'
description: 'Runs tests for the Python SDK'

inputs:
github-token:
description: 'GitHub token for benchmark uploads'
required: true

runs:
using: "composite"
steps:

# =================================================
# Setup
# =================================================

- uses: actions/setup-python@v4
with:
python-version: "3.x"

- name: Install UV
shell: bash
run: curl -LsSf https://astral.sh/uv/install.sh | sh

- name: Install dependencies
shell: bash
run: |
cd client_sdks/python
uv sync --dev
# =================================================
# Tests
# We run all tests except benchmarks
# =================================================

- name: Run tests
shell: bash
env:
MANAGER_TEST_URL: http://localhost:3000
BROKER_TEST_URL: amqp://user:password@localhost:5672
run: |
cd client_sdks/python
uv run pytest -m "not bench"
# =================================================
# Benchmarks
# Disabled for now.
# =================================================

# - name: Run benchmarks
# shell: bash
# run: |
# cd client_sdks/python
# uv run pytest -m "bench" --benchmark-json output.json

# - name: Store benchmark result
# uses: benchmark-action/github-action-benchmark@v1
# with:
# tool: 'pytest'
# output-file-path: client_sdks/python/output.json
# github-token: ${{ inputs.github-token }}
# comment-always: true
# auto-push: true
# summary-always: true
28 changes: 0 additions & 28 deletions .github/actions/test_python_sdk/action.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- main


jobs:

# =================================================
Expand Down Expand Up @@ -106,6 +107,8 @@ jobs:
# Python Tests
- name: Run Python tests
uses: ./.github/actions/test_python_sdk
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

# Cleanup
- uses: ./.github/actions/cleanup_sdk_test_environment
Expand Down
112 changes: 82 additions & 30 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 8735cd4

Please sign in to comment.