mirror of
https://github.com/opendatalab/MinerU.git
synced 2026-03-27 11:08:32 +07:00
feat: add test case (#645)
* feat: add table case * feat: add table case * feat: add table case * feat: add table case * feat: add table case * feat: add table case * feat: add table case * feat: add table case * feat: add table case * feat: add table case * feat: add table case * feat: add table case * feat: add table case * feat: add table case * feat: add table case * feat: add table case * feat: add table case * feat: add table case * feat: add table case * feat: add table case * feat: add table case * feat: add table case * feat: add table case * feat: add table case * feat: add table case * feat: add table case * feat: add table case * feat: add table case * feat: add table case * feat: add table case * feat: add table case * feat: add table case * feat: add table case * feat: add table case * feat: add table case * feat: add table case * feat: add table case * feat: add table case * feat: add table case * feat: add table case * feat: add table case * feat: add table case * feat: add table case * feat: add table case * feat: add table case * feat: add table case * feat: add table case --------- Co-authored-by: quyuan <quyuan@pjlab.org>
This commit is contained in:
21
.github/workflows/cli.yml
vendored
21
.github/workflows/cli.yml
vendored
@@ -10,7 +10,6 @@ on:
|
||||
paths-ignore:
|
||||
- "cmds/**"
|
||||
- "**.md"
|
||||
- "**.yml"
|
||||
pull_request:
|
||||
branches:
|
||||
- "master"
|
||||
@@ -18,12 +17,11 @@ on:
|
||||
paths-ignore:
|
||||
- "cmds/**"
|
||||
- "**.md"
|
||||
- "**.yml"
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
cli-test:
|
||||
runs-on: pdf
|
||||
timeout-minutes: 120
|
||||
timeout-minutes: 240
|
||||
strategy:
|
||||
fail-fast: true
|
||||
|
||||
@@ -33,17 +31,16 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 2
|
||||
|
||||
- name: install
|
||||
- name: install&test
|
||||
run: |
|
||||
echo $GITHUB_WORKSPACE && sh tests/retry_env.sh
|
||||
- name: unit test
|
||||
run: |
|
||||
cd $GITHUB_WORKSPACE && python tests/clean_coverage.py
|
||||
cd $GITHUB_WORKSPACE && export PYTHONPATH=. && coverage run -m pytest tests/unittest --cov=magic_pdf/ --cov-report term-missing --cov-report html
|
||||
source activate mineru
|
||||
conda env list
|
||||
pip show coverage
|
||||
# cd $GITHUB_WORKSPACE && sh tests/retry_env.sh
|
||||
cd $GITHUB_WORKSPACE && python tests/clean_coverage.py
|
||||
cd $GITHUB_WORKSPACE && coverage run -m pytest tests/unittest/ --cov=magic_pdf/ --cov-report html --cov-report term-missing
|
||||
cd $GITHUB_WORKSPACE && python tests/get_coverage.py
|
||||
- name: cli test
|
||||
run: |
|
||||
source ~/.bashrc && cd $GITHUB_WORKSPACE && pytest -s -v tests/test_cli/test_cli.py
|
||||
cd $GITHUB_WORKSPACE && pytest -m P0 -s -v tests/test_cli/test_cli_sdk.py
|
||||
|
||||
notify_to_feishu:
|
||||
if: ${{ always() && !cancelled() && contains(needs.*.result, 'failure') && (github.ref_name == 'master') }}
|
||||
|
||||
55
.github/workflows/daily.yml
vendored
Normal file
55
.github/workflows/daily.yml
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
|
||||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
|
||||
|
||||
name: mineru
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 22 * * *' # 每天晚上 10 点执行
|
||||
jobs:
|
||||
cli-test:
|
||||
runs-on: pdf
|
||||
timeout-minutes: 240
|
||||
strategy:
|
||||
fail-fast: true
|
||||
|
||||
steps:
|
||||
- name: PDF cli
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 2
|
||||
|
||||
- name: install&test
|
||||
run: |
|
||||
source activate mineru
|
||||
conda env list
|
||||
pip show coverage
|
||||
# cd $GITHUB_WORKSPACE && sh tests/retry_env.sh
|
||||
cd $GITHUB_WORKSPACE && python tests/clean_coverage.py
|
||||
cd $GITHUB_WORKSPACE && coverage run -m pytest tests/unittest/ --cov=magic_pdf/ --cov-report html --cov-report term-missing
|
||||
cd $GITHUB_WORKSPACE && python tests/get_coverage.py
|
||||
cd $GITHUB_WORKSPACE && pytest -s -v tests/test_cli/test_cli_sdk.py
|
||||
|
||||
notify_to_feishu:
|
||||
if: ${{ always() && !cancelled() && contains(needs.*.result, 'failure') && (github.ref_name == 'master') }}
|
||||
needs: cli-test
|
||||
runs-on: pdf
|
||||
steps:
|
||||
- name: get_actor
|
||||
run: |
|
||||
metion_list="dt-yy"
|
||||
echo $GITHUB_ACTOR
|
||||
if [[ $GITHUB_ACTOR == "drunkpig" ]]; then
|
||||
metion_list="xuchao"
|
||||
elif [[ $GITHUB_ACTOR == "myhloli" ]]; then
|
||||
metion_list="zhaoxiaomeng"
|
||||
elif [[ $GITHUB_ACTOR == "icecraft" ]]; then
|
||||
metion_list="xurui1"
|
||||
fi
|
||||
echo $metion_list
|
||||
echo "METIONS=$metion_list" >> "$GITHUB_ENV"
|
||||
echo ${{ env.METIONS }}
|
||||
|
||||
- name: notify
|
||||
run: |
|
||||
echo ${{ secrets.USER_ID }}
|
||||
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}'"},{"tag":"at","user_id":"'${{ secrets.USER_ID }}'"}]]}}}}' ${{ secrets.WEBHOOK_URL }}
|
||||
61
.github/workflows/huigui.yml
vendored
Normal file
61
.github/workflows/huigui.yml
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
|
||||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
|
||||
|
||||
name: mineru
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "master"
|
||||
- "dev"
|
||||
paths-ignore:
|
||||
- "cmds/**"
|
||||
- "**.md"
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
cli-test:
|
||||
runs-on: pdf
|
||||
timeout-minutes: 240
|
||||
strategy:
|
||||
fail-fast: true
|
||||
|
||||
steps:
|
||||
- name: PDF cli
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 2
|
||||
|
||||
- name: install&test
|
||||
run: |
|
||||
source activate mineru
|
||||
conda env list
|
||||
pip show coverage
|
||||
# cd $GITHUB_WORKSPACE && sh tests/retry_env.sh
|
||||
cd $GITHUB_WORKSPACE && python tests/clean_coverage.py
|
||||
cd $GITHUB_WORKSPACE && coverage run -m pytest tests/unittest/ --cov=magic_pdf/ --cov-report html --cov-report term-missing
|
||||
cd $GITHUB_WORKSPACE && python tests/get_coverage.py
|
||||
cd $GITHUB_WORKSPACE && pytest -s -v tests/test_cli/test_cli_sdk.py
|
||||
|
||||
notify_to_feishu:
|
||||
if: ${{ always() && !cancelled() && contains(needs.*.result, 'failure') && (github.ref_name == 'master') }}
|
||||
needs: cli-test
|
||||
runs-on: pdf
|
||||
steps:
|
||||
- name: get_actor
|
||||
run: |
|
||||
metion_list="dt-yy"
|
||||
echo $GITHUB_ACTOR
|
||||
if [[ $GITHUB_ACTOR == "drunkpig" ]]; then
|
||||
metion_list="xuchao"
|
||||
elif [[ $GITHUB_ACTOR == "myhloli" ]]; then
|
||||
metion_list="zhaoxiaomeng"
|
||||
elif [[ $GITHUB_ACTOR == "icecraft" ]]; then
|
||||
metion_list="xurui1"
|
||||
fi
|
||||
echo $metion_list
|
||||
echo "METIONS=$metion_list" >> "$GITHUB_ENV"
|
||||
echo ${{ env.METIONS }}
|
||||
|
||||
- name: notify
|
||||
run: |
|
||||
echo ${{ secrets.USER_ID }}
|
||||
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}'"},{"tag":"at","user_id":"'${{ secrets.USER_ID }}'"}]]}}}}' ${{ secrets.WEBHOOK_URL }}
|
||||
22
.github/workflows/update_base.yml
vendored
22
.github/workflows/update_base.yml
vendored
@@ -1,22 +0,0 @@
|
||||
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
|
||||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
|
||||
|
||||
name: update-base
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*released'
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
pdf-test:
|
||||
runs-on: pdf
|
||||
timeout-minutes: 40
|
||||
|
||||
|
||||
steps:
|
||||
- name: update-base
|
||||
uses: actions/checkout@v3
|
||||
- name: start-update
|
||||
run: |
|
||||
echo "start test"
|
||||
|
||||
Reference in New Issue
Block a user