Skip to content

feat: add functions to retrieve contract specs from wasm bytes and fi… #117

feat: add functions to retrieve contract specs from wasm bytes and fi…

feat: add functions to retrieve contract specs from wasm bytes and fi… #117

name: Test and Deploy
on:
push:
pull_request:
workflow_dispatch:
release:
types:
- created
jobs:
test:
strategy:
fail-fast: false
matrix:
# https://endoflife.date/python
platform:
[
{ os: "ubuntu-latest", python-version: "3.9" },
{ os: "ubuntu-latest", python-version: "3.10" },
{ os: "ubuntu-latest", python-version: "3.11" },
{ os: "ubuntu-latest", python-version: "3.12" },
{ os: "ubuntu-latest", python-version: "3.13" },
{ os: "macos-latest", python-version: "3.9" },
{ os: "macos-latest", python-version: "3.10" },
{ os: "macos-latest", python-version: "3.11" },
{ os: "macos-latest", python-version: "3.12" },
{ os: "macos-latest", python-version: "3.13" },
{ os: "windows-latest", python-version: "3.9" },
{ os: "windows-latest", python-version: "3.10" },
{ os: "windows-latest", python-version: "3.11" },
{ os: "windows-latest", python-version: "3.12" },
{ os: "windows-latest", python-version: "3.13" },
]
runs-on: ${{ matrix.platform.os }}
steps:
- uses: actions/checkout@v3
- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
- name: Install the project
run: uv sync --all-extras --dev
- name: Run tests
run: uv run pytest tests
- name: Install self
run: uv pip install -e .
- name: Generate bindings
run: uv run stellar-contract-bindings python --contract-id CDOAW6D7NXAPOCO7TFAWZNJHK62E3IYRGNRVX3VOXNKNVOXCLLPJXQCF --rpc-url https://mainnet.sorobanrpc.com --output ./bindings
web:
needs: [test]
if: github.event_name == 'release' && github.event.action == 'created' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy web_interface
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
deploy:
needs: [test]
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'created'
permissions:
id-token: write
steps:
- uses: actions/checkout@v3
- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Set up Python 3.13
run: uv python install 3.13
- name: Build the project
run: uv build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
complete:
if: always()
needs: [test, web, deploy]
runs-on: ubuntu-latest
steps:
- if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
run: exit 1