benchmark.yml 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. # This workflow will install Python dependencies, run tests and lint with a variety of Python versions
  2. # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
  3. name: mineru
  4. on:
  5. push:
  6. branches:
  7. - "master"
  8. paths-ignore:
  9. - "cmds/**"
  10. - "**.md"
  11. pull_request:
  12. branches:
  13. - "master"
  14. paths-ignore:
  15. - "cmds/**"
  16. - "**.md"
  17. workflow_dispatch:
  18. jobs:
  19. pdf-test:
  20. runs-on: ubuntu-latest
  21. timeout-minutes: 180
  22. strategy:
  23. fail-fast: true
  24. steps:
  25. - name: PDF benchmark
  26. uses: actions/checkout@v3
  27. with:
  28. fetch-depth: 2
  29. - name: check-requirements
  30. run: |
  31. changed_files=$(git diff --name-only -r HEAD~1 HEAD)
  32. echo $changed_files
  33. if [[ $changed_files =~ "requirements.txt" ]] || [[ $changed_files =~ "requirements-qa.txt" ]]; then
  34. pip install -r requirements.txt
  35. pip install -r requirements-qa.txt
  36. fi
  37. - name: get-benchmark-result
  38. run: |
  39. echo "start test"
  40. cd tools && python benchmark.py