Skip to content

add-foss4g-2025-slides #136

add-foss4g-2025-slides

add-foss4g-2025-slides #136

Workflow file for this run

name: Continuous Integration
on:
# will run both when pushing a branch and when pushing a tag
push:
pull_request:
# will run when called from another workflow
workflow_call:
outputs:
artifact_name:
description: "Name of the artifact containing the build package"
value: ${{ jobs.run_ci.outputs.artifact_name }}
env:
COLUMNS: 120
jobs:
run_ci:
runs-on: ubuntu-24.04
env:
ARTIFACT_NAME: "python-package"
outputs:
artifact_name: ${{ env.ARTIFACT_NAME }}
steps:
- name: "Grab code"
uses: actions/checkout@v4.2.2
with:
fetch-depth: "0"
- name: "Install uv"
uses: astral-sh/setup-uv@v5
with:
version: "0.6.13"
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: "Set up Python"
uses: actions/setup-python@v5
with:
python-version-file: "pyproject.toml"
- name: "Install code"
run: uv sync --frozen
- name: "Run ruff linter"
run: uv run ruff check
- name: "Run ruff formatter"
run: uv run ruff format --check
- name: "Run tests"
run: uv run pytest
- name: "Build Python package"
run: uv build
- name: "Upload built package as artifact"
id: upload_package_artifact
uses: actions/upload-artifact@v4
if: ${{ github.event_name != 'pull_request' }}
with:
name: "${{ env.ARTIFACT_NAME }}"
path: dist/
retention-days: 2