Commit 77c6b669 authored by Sidney233's avatar Sidney233
Browse files

test: Update cli.yml and huigui.yml

parent 6ba1d94b
...@@ -14,27 +14,31 @@ on: ...@@ -14,27 +14,31 @@ on:
jobs: jobs:
cli-test: cli-test:
if: github.repository == 'opendatalab/MinerU' if: github.repository == 'opendatalab/MinerU'
runs-on: pdf runs-on: ubuntu-latest
timeout-minutes: 240 timeout-minutes: 240
strategy: strategy:
fail-fast: true fail-fast: true
steps: steps:
- name: PDF cli - name: PDF cli
uses: actions/checkout@v3 uses: actions/checkout@v4
with: with:
ref: dev
fetch-depth: 2 fetch-depth: 2
- name: install uv
uses: astral-sh/setup-uv@v5
- name: install&test - name: install&test
run: | run: |
source activate mineru uv --version
conda env list uv venv --python 3.12
pip show coverage source .venv/bin/activate
cd $GITHUB_WORKSPACE && sh tests/retry_env.sh uv pip install .[test]
# cd $GITHUB_WORKSPACE && python tests/clean_coverage.py 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 && coverage run
# cd $GITHUB_WORKSPACE && python tests/get_coverage.py cd $GITHUB_WORKSPACE && python tests/get_coverage.py
cd $GITHUB_WORKSPACE && pytest -m P0 -s -v tests/test_cli/test_cli_sdk.py
notify_to_feishu: notify_to_feishu:
if: ${{ always() && !cancelled() && contains(needs.*.result, 'failure')}} if: ${{ always() && !cancelled() && contains(needs.*.result, 'failure')}}
......
...@@ -12,7 +12,7 @@ on: ...@@ -12,7 +12,7 @@ on:
- "**.md" - "**.md"
jobs: jobs:
cli-test: cli-test:
# if: github.repository == 'opendatalab/MinerU' if: github.repository == 'opendatalab/MinerU'
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 240 timeout-minutes: 240
strategy: strategy:
...@@ -37,29 +37,28 @@ jobs: ...@@ -37,29 +37,28 @@ jobs:
cd $GITHUB_WORKSPACE && python tests/clean_coverage.py cd $GITHUB_WORKSPACE && python tests/clean_coverage.py
cd $GITHUB_WORKSPACE && coverage run cd $GITHUB_WORKSPACE && coverage run
cd $GITHUB_WORKSPACE && python tests/get_coverage.py cd $GITHUB_WORKSPACE && python tests/get_coverage.py
cd $GITHUB_WORKSPACE && pytest -s -v tests/test_cli/test_cli_sdk.py
# notify_to_feishu: notify_to_feishu:
# if: ${{ always() && !cancelled() && contains(needs.*.result, 'failure')}} if: ${{ always() && !cancelled() && contains(needs.*.result, 'failure')}}
# needs: cli-test needs: cli-test
# runs-on: pdf runs-on: pdf
# steps: steps:
# - name: get_actor - name: get_actor
# run: | run: |
# metion_list="dt-yy" metion_list="dt-yy"
# echo $GITHUB_ACTOR echo $GITHUB_ACTOR
# if [[ $GITHUB_ACTOR == "drunkpig" ]]; then if [[ $GITHUB_ACTOR == "drunkpig" ]]; then
# metion_list="xuchao" metion_list="xuchao"
# elif [[ $GITHUB_ACTOR == "myhloli" ]]; then elif [[ $GITHUB_ACTOR == "myhloli" ]]; then
# metion_list="zhaoxiaomeng" metion_list="zhaoxiaomeng"
# elif [[ $GITHUB_ACTOR == "icecraft" ]]; then elif [[ $GITHUB_ACTOR == "icecraft" ]]; then
# metion_list="xurui1" metion_list="xurui1"
# fi fi
# echo $metion_list echo $metion_list
# echo "METIONS=$metion_list" >> "$GITHUB_ENV" echo "METIONS=$metion_list" >> "$GITHUB_ENV"
# echo ${{ env.METIONS }} echo ${{ env.METIONS }}
#
# - name: notify - name: notify
# run: | run: |
# #echo ${{ secrets.USER_ID }} #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":"'$USER_ID'"}]]}}}}' $WEBHOOK_URL 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":"'$USER_ID'"}]]}}}}' $WEBHOOK_URL
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment