ci: Update tdgpt-ci.yml

Adjust the working-directory as job level
This commit is contained in:
Feng Chao 2025-03-11 09:57:50 +08:00 committed by GitHub
parent 9e248bcf91
commit cef8c45eb2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 4 deletions

View File

@ -10,6 +10,7 @@ on:
jobs:
build:
runs-on: ubuntu-latest
working-directory: ${{ github.workspace }}/tools/tdgpt
strategy:
fail-fast: false
matrix:
@ -25,19 +26,16 @@ jobs:
cache: 'pip'
- name: Install dependencies
working-directory: ${{ github.workspace }}/tools/tdgpt
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest pylint
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Checking the code with pylint
working-directory: ${{ github.workspace }}/tools/tdgpt
run: |
pylint $(git ls-files '*.py') --exit-zero
- name: Checking the code with flake8
working-directory: ${{ github.workspace }}/tools/tdgpt
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
@ -45,6 +43,5 @@ jobs:
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Run test cases with pytest
working-directory: ${{ github.workspace }}/tools/tdgpt
run: |
pytest