name: test_quick

on:
  pull_request:
    branches: [main]
    
  workflow_dispatch:
    inputs:
      args:
        type: string
        default: ''
        description: 'Additional arguments to scripts/test.py'

jobs:

  master:
    name: mupdf master
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest]
      fail-fast: false
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
      - name: mupdf master
        env:
          PYMUPDF_test_args: ${{inputs.args}}
        run:
          python scripts/test.py build test -m 'git:--branch master https://github.com/ArtifexSoftware/mupdf.git' -a PYMUPDF_test_args

  release:
    name: mupdf release
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest]
      fail-fast: false
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
      - name: mupdf release
        env:
          PYMUPDF_test_args: ${{inputs.args}}
        run:
          python scripts/test.py build test -m 'git:--branch 1.27.x https://github.com/ArtifexSoftware/mupdf.git' -a PYMUPDF_test_args
