Skip to content

Python-package

Python-package #1

Workflow file for this run

---
name: Go Tests
on:
pull_request:
branches:
- main
push:
branches:
- main
permissions:
contents: write
jobs:
tests:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.11', '3.12', '3.13']
env:
GOEXPERIMENT: cgocheck2
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.21'
cache: false
- name: Install Xcaddy
run: go install github.com/caddyserver/xcaddy/cmd/xcaddy@latest
- name: Set up Python ${{ matrix.python-version }}
run: |
export DEBIAN_FRONTEND=noninteractive
sudo apt-get update -yyqq
sudo apt-get install -yyqq software-properties-common
sudo add-apt-repository -y ppa:deadsnakes/ppa
sudo apt-get install -yyqq python${{ matrix.python-version }}-dev python${{ matrix.python-version }}-venv
sudo mv /usr/lib/x86_64-linux-gnu/pkgconfig/python-${{ matrix.python-version }}-embed.pc /usr/lib/x86_64-linux-gnu/pkgconfig/python3-embed.pc
- name: Install global python dependencies
run: sudo pip install requests
- name: Run module tests
run: go test -race -v ./...
- name: Build the CLI
run: |
cd cmd/cli
CGO_ENABLED=1 go build -o caddysnake-cli main.go
export CIBW_BUILD=cp$(echo ${{ matrix.python-version }} | tr -d .)-manylinux_x86_64
cibuildwheel