name: Test valgrind

on:
  workflow_dispatch:
  schedule:
    - cron: '13 6 * * *'

jobs:

  valgrind:
    name: valgrind
    runs-on: ubuntu-latest
    strategy:
      matrix:
        args: [
            '',
            '-m "git:--branch master https://github.com/ArtifexSoftware/mupdf"', 
            '-m "git:--branch 1.27.x https://github.com/ArtifexSoftware/mupdf"',
            ]
      fail-fast: false
    
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
      - name: valgrind
        run:
          python scripts/test.py ${{matrix.args}} -P 1 -T valgrind build test
