Files
wehub-resource-sync e04ed9c211
CF: Deploy Dev Docs / deploy (push) Has been cancelled
Sync Labels / build (push) Has been cancelled
tests / unit tests (macos-latest) (push) Has been cancelled
tests / unit tests (windows-latest) (push) Has been cancelled
tests / unit tests (ubuntu-latest) (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 13:32:45 +08:00

71 lines
2.2 KiB
YAML

# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: pypi
on:
pull_request:
paths:
- "pypi/**"
- ".github/workflows/pypi.yml"
permissions: read-all
jobs:
build-and-verify:
name: build & verify wheel
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: Setup Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: go.mod
- name: Setup Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "3.12"
- name: Install build tooling
run: python -m pip install --upgrade pip build pytest
- name: Build toolbox binary and stage it for the wheel
# setup.py now expects the binary pre-staged in src/toolbox_server/bin/
# instead of downloading from GCS at build time.
run: |
go build -o pypi/src/toolbox_server/bin/toolbox .
chmod +x pypi/src/toolbox_server/bin/toolbox
- name: Build wheel
working-directory: pypi
env:
# setup.py requires this explicitly; matches the Linux x86_64 binary
# built above. Release pipeline sets it per-platform in a loop.
TOOLBOX_PLATFORM: manylinux2014_x86_64
run: python -m build --wheel
- name: Install built wheel
run: pip install pypi/dist/*.whl
- name: Verify console script runs
run: toolbox-server --help
- name: Run wrapper tests
run: pytest pypi/tests/ -v