Skip to content

Bump the all-gh-actions-dependencies group with 2 updates #182

Bump the all-gh-actions-dependencies group with 2 updates

Bump the all-gh-actions-dependencies group with 2 updates #182

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Python package
on:
push:
branches: ["*"]
tags: ["release/*"]
pull_request:
branches: [master]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9, "3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v3
with:
version: "latest"
enable-cache: true
- name: Install Python
run: uv python install ${{ matrix.python-version }}
- name: Install dependencies
run: uv sync -i https://pypi.org/simple # Ignore download URLs in uv.lock.
- name: Lint with ruff
run: uv run ruff check src/cosmic_ray
- name: Test with pytest
run: uv run pytest tests --run-slow
pypi-publish:
name: Upload release to PyPI
needs: test
if: startsWith(github.ref, 'refs/tags/release')
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/cosmic-ray
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v3
with:
version: "latest"
enable-cache: true
- name: Install Python
run: uv python install 3.12
- name: "Build distribution"
run: |
uv pip install build
uv run python -m build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1