Skip to content

Update build system #253

Update build system

Update build system #253

Workflow file for this run

name: Python Build
"on":
push:
branches: ["main"]
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+rc[0-9]+"
pull_request:
jobs:
from_uv:
name: python source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version: "0.6.5"
- name: "Set up Python"
uses: actions/setup-python@v5
with:
python-version-file: "pyproject.toml"
- name: Install pyssht
run: uv sync --all-extras --dev
- name: run pytest
run: uv run pytest tests/test_pyssht.py
from_sdist:
name: python source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version: "0.6.5"
- name: "Set up Python"
uses: actions/setup-python@v5
with:
python-version-file: "pyproject.toml"
- name: Build sdist
run: uv build --sdist
- name: install wheel
run:
- uv venv

Check failure on line 51 in .github/workflows/python.yml

View workflow run for this annotation

GitHub Actions / Python Build

Invalid workflow file

The workflow is not valid. .github/workflows/python.yml (Line: 51, Col: 11): A sequence was not expected .github/workflows/python.yml (Line: 77, Col: 11): A sequence was not expected
- "uv pip install dist/pyssht-*.tar.gz"
- name: run pytests
run: uv pip install pytest && uv run pytest tests
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version: "0.6.5"
- name: "Set up Python"
uses: actions/setup-python@v5
with:
python-version-file: "pyproject.toml"
- name: Build wheels
run: uv build --wheel
- name: install wheel
run:
- uv venv
- "uv pip install dist/*.whl"
- name: run pytests
run: uv pip install pytest && uv run pytest tests
publication:
name: publish to pypi
if: ${{ startsWith(github.ref, 'refs/tags') }}
runs-on: macos-latest
steps:
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version: "0.6.5"
- name: Publish distribution 📦 to Test PyPI
if: ${{ github.ref != 'refs/tags/v1.5.2' }}
run: "uv publish --publish-url https://test.pypi.org/legacy --token ${{ secrets.TEST_PYPI_TOKEN }}"
- name: Publish distribution 📦 to PyPI
if: ${{ github.ref == 'refs/tags/v1.5.2' }}
run: "uv publish --token ${{ secrets.TEST_PYPI_TOKEN }}"