huigui.yml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. - "dev"
  9. paths-ignore:
  10. - "cmds/**"
  11. - "**.md"
  12. jobs:
  13. cli-test:
  14. # if: github.repository == 'opendatalab/MinerU'
  15. runs-on: ubuntu-latest
  16. timeout-minutes: 240
  17. strategy:
  18. fail-fast: true
  19. steps:
  20. - name: PDF cli
  21. uses: actions/checkout@v4
  22. with:
  23. ref: dev
  24. fetch-depth: 2
  25. - name: install uv
  26. uses: astral-sh/setup-uv@v5
  27. - name: install&test
  28. run: |
  29. uv --version
  30. uv venv --python 3.12
  31. source .venv/bin/activate
  32. uv pip install .[test]
  33. cd $GITHUB_WORKSPACE && python tests/clean_coverage.py
  34. cd $GITHUB_WORKSPACE && coverage run
  35. cd $GITHUB_WORKSPACE && python tests/get_coverage.py
  36. notify_to_feishu:
  37. # if: ${{ always() && !cancelled() && contains(needs.*.result, 'failure')}}
  38. needs: cli-test
  39. runs-on: ubuntu-latest
  40. steps:
  41. - name: get_actor
  42. run: |
  43. metion_list="dt-yy"
  44. echo $GITHUB_ACTOR
  45. if [[ $GITHUB_ACTOR == "drunkpig" ]]; then
  46. metion_list="xuchao"
  47. elif [[ $GITHUB_ACTOR == "myhloli" ]]; then
  48. metion_list="zhaoxiaomeng"
  49. elif [[ $GITHUB_ACTOR == "icecraft" ]]; then
  50. metion_list="xurui1"
  51. fi
  52. echo $metion_list
  53. echo "METIONS=$metion_list" >> "$GITHUB_ENV"
  54. echo ${{ env.METIONS }}
  55. - name: notify
  56. run: |
  57. curl -X POST -H "Content-Type: application/json" -d '{"msg_type":"post","content":{"post":{"zh_cn":{"title":"'${{ github.repository }}' GitHubAction Failed","content":[[{"tag":"text","text":""},{"tag":"a","text":"Please click here for details ","href":"https://github.com/'${{ github.repository }}'/actions/runs/'${GITHUB_RUN_ID}'"}]]}}}}' ${{ secrets.FEISHU_WEBHOOK_URL }}