Skip to content

Switchyard lets LLM applications route traffic across models and providers while preserving native OpenAI and Anthropic API compatibility - enabling flexible model selection, benchmarking, and cost/performance optimization.

Rust

ci: lint GitHub Actions workflows (#677)

Alex Fournier2806a81b7757
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index d0be6d6d2..7c59bc0f6 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -41,7 +41,7 @@ jobs:
# ruff is a hard gate — the codebase passes today, keep it that way.
lint:
- name: Lint (ruff)
+ name: Lint
needs: changes
if: needs.changes.outputs.full_ci == 'true'
runs-on: ubuntu-latest
@@ -52,6 +52,8 @@ jobs:
python-version: "3.12"
enable-cache: true
cache-dependency-glob: "uv.lock"
+ - name: actionlint
+ run: uvx --from pre-commit==4.5.0 pre-commit run actionlint --all-files
- run: uv sync --locked --no-install-project
- name: ruff check
run: uv run --no-sync ruff check .
diff --git a/.github/workflows/perf.yml b/.github/workflows/perf.yml
index e73eb2798..024f8331f 100644
--- a/.github/workflows/perf.yml
+++ b/.github/workflows/perf.yml
@@ -142,13 +142,13 @@ jobs:
type = "passthrough"
target = "mock"
TOML
- target/release/switchyard-server --config bench.toml --port $PROXY_PORT &
+ target/release/switchyard-server --config bench.toml --port "$PROXY_PORT" &
echo "PROXY_PID=$!" >> "$GITHUB_ENV"
- name: Wait for proxy to be ready
run: |
for i in $(seq 1 30); do
- if curl -sf http://localhost:$PROXY_PORT/health > /dev/null 2>&1; then
+ if curl -sf "http://localhost:${PROXY_PORT}/health" > /dev/null 2>&1; then
echo "Proxy is up after ${i}s"
exit 0
fi
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 44520b79b..f8738d616 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -11,6 +11,11 @@ repos:
additional_dependencies:
- "@commitlint/[email protected]"
+ - repo: https://github.com/rhysd/actionlint
+ rev: v1.7.12
+ hooks:
+ - id: actionlint
+
- repo: local
hooks:
- id: spdx-headers