Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 103 additions & 0 deletions .github/workflows/dependency-stability.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
name: Dependency Lock Stability

on:
pull_request:
branches: [ main ]
paths:
- "**/go.mod"
- "**/go.sum"
- "**/uv.lock"
- "**/pyproject.toml"
- "**/package.json"
- "**/pnpm-lock.yaml"
workflow_dispatch:

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
go-modules:
name: go.mod tidy (${{ matrix.module }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- module: components/execd
- module: components/egress
- module: components/ingress
- module: components/internal
- module: components/nodeagent
- module: kubernetes
- module: sdks/sandbox/go
- module: sdks/sandbox/go/poolredis
- module: tests/go
- module: examples/chrome
steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: "1.25.9"

- name: Check go.mod is tidy
working-directory: ${{ matrix.module }}
run: |
go mod tidy
git diff --exit-code -- go.mod go.sum

uv-lockfiles:
name: uv.lock (${{ matrix.project }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- project: server
- project: cli
- project: sdks/sandbox/python
- project: sdks/code-interpreter/python
- project: sdks/mcp/sandbox/python
- project: tests/python
steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Set up uv
uses: astral-sh/setup-uv@v7

- name: Check uv.lock is up to date
working-directory: ${{ matrix.project }}
run: |
uv lock --check

js-lockfile:
name: pnpm-lock.yaml (tests/javascript)
Comment thread
Pangjiping marked this conversation as resolved.
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 9.15.0
run_install: false

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "pnpm"
cache-dependency-path: tests/javascript/pnpm-lock.yaml

- name: Check pnpm-lock.yaml is in sync
working-directory: tests/javascript
run: |
pnpm install --frozen-lockfile --lockfile-only --ignore-scripts
100 changes: 12 additions & 88 deletions .github/workflows/sdk-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
area: sdk

cli-quality:
name: CLI Quality
name: CLI Quality And Tests
needs: changes
if: needs.changes.outputs.relevant == 'true'
runs-on: ubuntu-latest
Expand Down Expand Up @@ -72,30 +72,6 @@ jobs:
run: |
uv run pyright

cli-tests:
name: CLI Tests
needs: changes
if: needs.changes.outputs.relevant == 'true'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.11"

- name: Install uv
uses: astral-sh/setup-uv@v7
with:
version: "latest"

- name: Install dependencies
working-directory: cli
run: |
uv sync

- name: Run tests
working-directory: cli
run: |
Expand All @@ -111,7 +87,7 @@ jobs:
cli/reports/**

python-sdk-quality:
name: Python SDK Quality (${{ matrix.package_name }})
name: Python SDK Quality And Tests (${{ matrix.package_name }})
needs: changes
if: needs.changes.outputs.relevant == 'true'
runs-on: ubuntu-latest
Expand All @@ -121,8 +97,10 @@ jobs:
include:
- package_name: sandbox
package_dir: sdks/sandbox/python
coverage_target: src/opensandbox
- package_name: code-interpreter
package_dir: sdks/code-interpreter/python
coverage_target: src/code_interpreter
steps:
- name: Checkout code
uses: actions/checkout@v6
Expand Down Expand Up @@ -158,46 +136,6 @@ jobs:
run: |
uv run pyright

python-sdk-tests:
name: Python SDK Tests (${{ matrix.package_name }})
needs: changes
if: needs.changes.outputs.relevant == 'true'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- package_name: sandbox
package_dir: sdks/sandbox/python
coverage_target: src/opensandbox
- package_name: code-interpreter
package_dir: sdks/code-interpreter/python
coverage_target: src/code_interpreter
steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.11"

- name: Install uv
uses: astral-sh/setup-uv@v7
with:
version: "latest"

- name: Install dependencies
working-directory: ${{ matrix.package_dir }}
run: |
uv sync

- name: Generate API
if: matrix.package_name == 'sandbox'
working-directory: sdks/sandbox/python
run: |
uv run python scripts/generate_api.py

- name: Run tests
working-directory: ${{ matrix.package_dir }}
run: |
Expand Down Expand Up @@ -281,20 +219,10 @@ jobs:
${{ matrix.package_dir }}/reports/**

kotlin-sdk-quality:
name: Kotlin SDK Quality And Tests (${{ matrix.package_name }})
name: Kotlin SDK Quality And Tests
needs: changes
if: needs.changes.outputs.relevant == 'true'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- package_name: sandbox
package_dir: sdks/sandbox/kotlin
test_task: :sandbox:test
- package_name: code-interpreter
package_dir: sdks/sandbox/kotlin
test_task: :code-interpreter:test
steps:
- name: Checkout code
uses: actions/checkout@v6
Expand All @@ -309,18 +237,18 @@ jobs:
uses: gradle/actions/setup-gradle@v5

- name: Run quality checks and tests
working-directory: ${{ matrix.package_dir }}
working-directory: sdks/sandbox/kotlin
run: |
./gradlew spotlessCheck ${{ matrix.test_task }}
./gradlew spotlessCheck :sandbox:test :code-interpreter:test

- name: Upload Kotlin reports
if: always()
uses: actions/upload-artifact@v4
with:
name: kotlin-${{ matrix.package_name }}-reports
name: kotlin-reports
path: |
${{ matrix.package_dir }}/**/build/test-results/test/**
${{ matrix.package_dir }}/**/build/reports/tests/test/**
sdks/sandbox/kotlin/**/build/test-results/test/**
sdks/sandbox/kotlin/**/build/reports/tests/test/**

csharp-sdk-quality:
name: C# SDK Quality And Tests (${{ matrix.package_name }})
Expand Down Expand Up @@ -420,9 +348,7 @@ jobs:
needs:
- changes
- cli-quality
- cli-tests
- python-sdk-quality
- python-sdk-tests
- javascript-sdk-quality
- kotlin-sdk-quality
- csharp-sdk-quality
Expand All @@ -434,9 +360,7 @@ jobs:
RELEVANT: ${{ needs.changes.outputs.relevant }}
CHANGES_RESULT: ${{ needs.changes.result }}
CLI_QUALITY_RESULT: ${{ needs.cli-quality.result }}
CLI_TESTS_RESULT: ${{ needs.cli-tests.result }}
PYTHON_QUALITY_RESULT: ${{ needs.python-sdk-quality.result }}
PYTHON_TESTS_RESULT: ${{ needs.python-sdk-tests.result }}
JAVASCRIPT_RESULT: ${{ needs.javascript-sdk-quality.result }}
KOTLIN_RESULT: ${{ needs.kotlin-sdk-quality.result }}
CSHARP_RESULT: ${{ needs.csharp-sdk-quality.result }}
Expand All @@ -447,7 +371,7 @@ jobs:
exit 1
fi
if [[ "$RELEVANT" == "true" ]]; then
[[ "$CLI_QUALITY_RESULT" == "success" && "$CLI_TESTS_RESULT" == "success" && "$PYTHON_QUALITY_RESULT" == "success" && "$PYTHON_TESTS_RESULT" == "success" && "$JAVASCRIPT_RESULT" == "success" && "$KOTLIN_RESULT" == "success" && "$CSHARP_RESULT" == "success" && "$GO_RESULT" == "success" ]]
[[ "$CLI_QUALITY_RESULT" == "success" && "$PYTHON_QUALITY_RESULT" == "success" && "$JAVASCRIPT_RESULT" == "success" && "$KOTLIN_RESULT" == "success" && "$CSHARP_RESULT" == "success" && "$GO_RESULT" == "success" ]]
else
[[ "$RELEVANT" == "false" && "$CLI_QUALITY_RESULT" == "skipped" && "$CLI_TESTS_RESULT" == "skipped" && "$PYTHON_QUALITY_RESULT" == "skipped" && "$PYTHON_TESTS_RESULT" == "skipped" && "$JAVASCRIPT_RESULT" == "skipped" && "$KOTLIN_RESULT" == "skipped" && "$CSHARP_RESULT" == "skipped" && "$GO_RESULT" == "skipped" ]]
[[ "$RELEVANT" == "false" && "$CLI_QUALITY_RESULT" == "skipped" && "$PYTHON_QUALITY_RESULT" == "skipped" && "$JAVASCRIPT_RESULT" == "skipped" && "$KOTLIN_RESULT" == "skipped" && "$CSHARP_RESULT" == "skipped" && "$GO_RESULT" == "skipped" ]]
fi
1 change: 0 additions & 1 deletion kubernetes/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ require (
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/pgzip v1.2.5 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
Expand Down
1 change: 0 additions & 1 deletion kubernetes/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo=
github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ=
github.com/klauspost/pgzip v1.2.5/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
Expand Down
Loading