From 6b6177ebf7d1666365c5d23872ec35f3c4505c3b Mon Sep 17 00:00:00 2001 From: Yijia-Xiao Date: Sun, 14 Jun 2026 16:38:36 +0000 Subject: [PATCH] ci: lint the full repository With the tree clean, the lint job runs ruff check . on every push and PR rather than only the files a PR changes, so a lint regression is caught anywhere. --- .github/workflows/ci.yml | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e0370afc5..7b7207951 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,30 +46,16 @@ jobs: python -c "import tradingagents, cli.main; print('clean-install import OK')" lint: - name: ruff (changed files, strict) + name: ruff (strict, full repo) runs-on: ubuntu-latest - if: github.event_name == 'pull_request' steps: - uses: actions/checkout@v4 - with: - fetch-depth: 0 - uses: actions/setup-python@v5 with: python-version: "3.12" - name: Install ruff run: pip install "ruff>=0.15" - - name: Lint only the Python files this PR changes - env: - BASE_SHA: ${{ github.event.pull_request.base.sha }} - run: | - # Strict going-forward gate: the full-repo cleanup is deferred (see - # worklog 03/01), so we lint only files this PR adds or modifies. - files=$(git diff --name-only --diff-filter=ACM "$BASE_SHA"...HEAD -- '*.py' \ - | grep -vE '^(results|worklog)/' || true) - if [ -z "$files" ]; then - echo "No Python changes to lint." - exit 0 - fi - echo "Linting changed files:" - echo "$files" - ruff check $files + - name: Lint the repository + # The repo is fully clean under the strict select, so we lint everything + # (results/ and worklog/ are excluded via pyproject extend-exclude). + run: ruff check .