name: Python Test PR
on:
merge_group:
pull_request:
env:
DEFAULT_PYTHON_VERSION: "3.11"
jobs:
nox:
name: Test with nox
runs-on: ubuntu-24.04
steps:
- name: Run nox
uses: frequenz-floss/gh-action-nox@v1.0.1
with:
python-version: "3.11"
nox-session: ci_checks_max
build:
name: Build distribution packages
runs-on: ubuntu-24.04
steps:
- name: Setup Git
uses: frequenz-floss/gh-action-setup-git@v1.0.0
- name: Fetch sources
uses: actions/checkout@v5
with:
submodules: true
- name: Setup Python
uses: frequenz-floss/gh-action-setup-python-with-deps@v1.0.1
with:
python-version: ${{ env.DEFAULT_PYTHON_VERSION }}
dependencies: build
- name: Build the source and binary distribution
run: python -m build
- name: Upload distribution files
uses: actions/upload-artifact@v5
with:
name: dist
path: dist/
if-no-files-found: error
test-docs:
name: Test documentation website generation
runs-on: ubuntu-24.04
steps:
- name: Setup Git
uses: frequenz-floss/gh-action-setup-git@v1.0.0
- name: Fetch sources
uses: actions/checkout@v5
with:
submodules: true
- name: Setup Python
uses: frequenz-floss/gh-action-setup-python-with-deps@v1.0.1
with:
python-version: ${{ env.DEFAULT_PYTHON_VERSION }}
dependencies: .[dev-mkdocs]
- name: Generate the documentation
env:
MIKE_VERSION: gh-${{ github.job }}
run: |
mike deploy $MIKE_VERSION
mike set-default $MIKE_VERSION
- name: Upload site
uses: actions/upload-artifact@v5
with:
name: docs-site
path: site/
if-no-files-found: error