diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index cd77022ed..9e37ea296 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -8,6 +8,8 @@ on: branches: - main + workflow_dispatch: + concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 000000000..279aaa98e --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,49 @@ +name: Check File Changes + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + check_changes: + runs-on: ubuntu-latest + outputs: + changed: ${{ steps.filter.outputs.any_changed }} + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Filter changed files + id: filter + uses: dorny/paths-filter@v2 + with: + # 定义一个 filter group,把所有关心的文件放在同一组 + filters: | + any_changed: + - 'lazyllm/launcher.py' + - 'lazyllm/components/deploy/**/*.py' + - 'lazyllm/module/llms/trainablemodule.py' + + get_changed_env: + runs-on: ubuntu-latest + needs: check_changes + steps: + - run: | + echo "IF_CHANGED=${{ needs.check_changes.outputs.changed }}" >> $GITHUB_ENV + + - name: test + run: | + cat $GITHUB_ENV + if [ "$IF_CHANGED" = "true" ]; then + echo "目标文件有变化" + else + echo "目标文件没有变化" + fi + + diff --git a/lazyllm/module/llms/trainablemodule.py b/lazyllm/module/llms/trainablemodule.py index dd04812a0..8ec81857a 100644 --- a/lazyllm/module/llms/trainablemodule.py +++ b/lazyllm/module/llms/trainablemodule.py @@ -6,7 +6,6 @@ import copy import uuid import re -import requests import yaml from deepdiff import DeepDiff