name: Tests
on:
  push:
    branches:
      - master
      - main
  pull_request:
    branches:
      - master
      - main
  workflow_dispatch:

jobs:
  build:
    name: Uncommitted doc changes
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        include:
          - python-version: "3.13"
            plone-version: "6.2"
    steps:
      # git checkout
      - uses: actions/checkout@v4

      # Python setup
      - name: Set up Python ${{ matrix.python-version }}
        uses: actions/setup-python@v5
        with:
          python-version: ${{ matrix.python-version }}
          cache: "pip"

      # Run tests
      - name: Install dependencies
        run: make test
        env:
          zope_i18n_compile_mo_files: True

      # test no uncommitted changes
      - name: test no uncommitted changes
        run: ./test-no-uncommitted-doc-changes
        env:
          PYTHON_VERSION: ${{ matrix.python-version }}
          PLONE_VERSION: ${{ matrix.plone-version }}