From db4613c1b587af7358edb880763da381f85016b6 Mon Sep 17 00:00:00 2001 From: pradhyum6144 Date: Sun, 1 Mar 2026 22:24:06 +0530 Subject: [PATCH] ci: add GitHub Actions workflow for Python SDK Signed-off-by: pradhyum6144 Signed-off-by: pradhyum6144 --- .github/workflows/python-sdk.yml | 63 ++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 .github/workflows/python-sdk.yml diff --git a/.github/workflows/python-sdk.yml b/.github/workflows/python-sdk.yml new file mode 100644 index 0000000..5c86381 --- /dev/null +++ b/.github/workflows/python-sdk.yml @@ -0,0 +1,63 @@ +name: Python SDK + +on: + push: + branches: [main, release-*] + paths: + - 'specs-python/**' + pull_request: + branches: [main, release-*] + paths: + - 'specs-python/**' + +permissions: + contents: read + +jobs: + test: + name: Test + runs-on: ubuntu-latest + timeout-minutes: 10 + strategy: + matrix: + python-version: ['3.10', '3.11', '3.12', '3.13'] + steps: + - name: Checkout code + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -e specs-python/[dev] + + - name: Run tests + run: python -m pytest specs-python/tests/ -v + + lint: + name: Lint + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - name: Checkout code + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + + - name: Set up Python + uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 + with: + python-version: '3.12' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install ruff + + - name: Ruff check + run: ruff check specs-python/ + + - name: Ruff format check + run: ruff format --check specs-python/