name: Python package

on: [push, pull_request]

jobs:
  build:

    runs-on: ubuntu-latest
    continue-on-error: ${{ matrix.experimental }}
    strategy:
      matrix:
        python-version: [3.6, 3.7, 3.8]
        experimental: [false]
        include:
          - python-version: 3.9
            experimental: true

    steps:
    - uses: actions/checkout@v2
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v2
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install dependencies
      run: |
        sudo apt-get -y install plantuml libxml2-dev libxslt-dev python3-dev
        python -m pip install --upgrade pip
        pip install pytest
        pip install --upgrade setuptools
        pip install pytest pre-commit
        pip install -c requirements.txt -e .[tests,sphinx,svgsupport,aafiguresupport,mathsupport,rawhtmlsupport]
    - name: Lint
      run: |
        pre-commit run --all-files --show-diff-on-failure
      if: matrix.python-version == '3.8'
    - name: Test with pytest
      continue-on-error: true
      run: |
        pytest -v
    - name: Archive test output
      uses: actions/upload-artifact@v2
      with:
        name: failed-tests
        path: rst2pdf/tests/output
        retention-days: 8

name: Python package

on: [push, pull_request]

jobs:
  build:

    runs-on: ubuntu-latest
    continue-on-error: ${{ matrix.experimental }}
    strategy:
      matrix:
        python-version: [3.6, 3.7, 3.8, 3.9]
        experimental: [false]
        include:
          - python-version: 3.10-dev
            experimental: true

    steps:
    - uses: actions/checkout@v2
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v2
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install dependencies
      run: |
        sudo apt-get -y install plantuml libxml2-dev libxslt-dev python3-dev
        python -m pip install --upgrade pip
        pip install pytest
        pip install --upgrade setuptools
        pip install pytest pre-commit
        pip install -c requirements.txt -e .[tests,sphinx,svgsupport,aafiguresupport,mathsupport,rawhtmlsupport]
    - name: Lint
      run: |
        pre-commit run --all-files --show-diff-on-failure
      if: matrix.python-version == '3.8'
    - name: Test with pytest
      continue-on-error: true
      run: |
        pytest -v
    - name: Archive test output
      uses: actions/upload-artifact@v2
      with:
        name: failed-tests
        path: rst2pdf/tests/output
        retention-days: 8

Set 3.9 as stable and 3.10 as experimental
CI: Set 3.9 as stable and 3.10 as experimental

We require the tests to pass under Python 3.9 now. 3.10 is not out yet,
but we should test it, allowing it to fail.
