Skip to content

Observable report

Observable report #169

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Python package
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10"]
permissions:
id-token: write
contents: write
steps:
- uses: actions/checkout@v4
- name: Install uv and set the python version
uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install the project
run: uv sync --all-extras --dev
- name: Build Package
run: uv build
- name: Run tests
run: uv run pytest tests
- name: Show package version
run: grep -r "version" pyproject.toml || grep -r "__version__" rtichoke/ || python -c "import rtichoke; print(rtichoke.__version__)"
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
- name: Set Git identity for Quarto publishing
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Quartodoc build
working-directory: docs
run: uv run quartodoc build
- name: Render and Publish
working-directory: docs
run: uv run quarto publish gh-pages --no-browser --token "${{ secrets.GITHUB_TOKEN }}"
- name: Publish package
if: github.ref == 'refs/heads/main' && matrix.python-version == '3.10'
run: uv publish