name: Plugin SDK # Builds and tests the pluginsdk/ Go module (extension protocol, Go SDK, # client and conformance suite) and the Python SDK in pluginsdk/python on # every push / PR that touches them. The Go conformance suite also runs the # Python SDK's test plugin. on: push: branches: [main] paths: - 'pluginsdk/**' - 'examples/plugins/notebooks/**' - 'examples/plugins/links/**' - '.github/workflows/plugin-sdk.yml' pull_request: paths: - 'pluginsdk/**' - 'examples/plugins/notebooks/**' - 'examples/plugins/links/**' - '.github/workflows/plugin-sdk.yml' defaults: run: working-directory: pluginsdk shell: bash permissions: contents: read jobs: test: name: test (${{ matrix.os }}) runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] steps: - uses: actions/checkout@v6 - uses: actions/setup-go@v6 with: go-version: '1.26' cache-dependency-path: pluginsdk/go.mod - uses: actions/setup-python@v6 with: python-version: '3.13' - name: go build run: go build ./... - name: go test run: go test -race ./... - name: go vet run: go vet ./... python: name: python ${{ matrix.python }} (${{ matrix.os }}) runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: include: - { os: ubuntu-latest, python: '3.9' } - { os: ubuntu-latest, python: '3.13' } - { os: windows-latest, python: '3.13' } defaults: run: working-directory: pluginsdk/python # A job's run defaults replace the workflow's, shell included. shell: bash steps: - uses: actions/checkout@v6 - uses: actions/setup-python@v6 with: python-version: ${{ matrix.python }} - name: unittest run: python -W error::ResourceWarning -m unittest discover -s tests -v - name: example plugins run: | (cd ../../examples/plugins/notebooks && python -m unittest -v test_main) (cd ../../examples/plugins/links && python -m unittest -v test_main) - name: build the package run: python -m pip install build && python -m build