diff --git a/.github/workflows/add_label_automerge.yml b/.github/workflows/add_label_automerge.yml index c9d6d4259..d379c19c7 100644 --- a/.github/workflows/add_label_automerge.yml +++ b/.github/workflows/add_label_automerge.yml @@ -1,21 +1,23 @@ name: Add label on auto-merge enabled + on: - pull_request_target: - types: - - auto_merge_enabled + pull_request_target: + types: + - auto_merge_enabled + jobs: - add-label-on-auto-merge: - runs-on: ubuntu-latest - steps: - - name: Add label - uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 - with: - script: | - github.rest.issues.addLabels({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.issue.number, - labels: ['ready'] - }) - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + add-label-on-auto-merge: + runs-on: ubuntu-latest + steps: + - name: Add label + uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 + with: + script: | + github.rest.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + labels: ['ready'] + }) + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/build-and-publish.yaml b/.github/workflows/build_and_publish.yaml similarity index 100% rename from .github/workflows/build-and-publish.yaml rename to .github/workflows/build_and_publish.yaml diff --git a/.github/workflows/actionlint.yml b/.github/workflows/lint_actions.yml similarity index 50% rename from .github/workflows/actionlint.yml rename to .github/workflows/lint_actions.yml index 0226cf0ca..b83d68904 100644 --- a/.github/workflows/actionlint.yml +++ b/.github/workflows/lint_actions.yml @@ -1,19 +1,17 @@ -name: Lint GitHub Actions workflows +name: Lint GitHub Actions + on: - push: - branches: - - "main" - paths: - - '.github/workflows/*.ya?ml' - - '.github/workflows/actionlint.*' - - '.github/workflows/matchers/actionlint.json' + # Trigger the workflow on push or pull request, but only for the main branch. + # Don't use pull_request.paths filter since this workflow is required for + # all pull requests on main irrespective of file type or location. pull_request: + branches: + - main + push: branches: - "main" paths: - '.github/workflows/*.ya?ml' - - '.github/workflows/actionlint.*' - - '.github/workflows/matchers/actionlint.json' env: LC_ALL: en_US.UTF-8 @@ -26,7 +24,7 @@ permissions: contents: read jobs: - actionlint: + lint-actions: runs-on: ubuntu-latest steps: - name: "Checkout" @@ -35,6 +33,8 @@ jobs: fetch-depth: 0 - name: "Run actionlint" - run: | - echo "::add-matcher::.github/workflows/matchers/actionlint.json" - tools/actionlint.sh -color + uses: raven-actions/actionlint@v2 + with: + matcher: true + cache: false + fail-on-error: true diff --git a/.github/workflows/lint_code.yml b/.github/workflows/lint_code.yml index 18aedeebb..9039e36bb 100644 --- a/.github/workflows/lint_code.yml +++ b/.github/workflows/lint_code.yml @@ -1,34 +1,23 @@ -name: lint code +name: Lint Code on: - # Trigger the workflow on push or pull request, - # but only for the main branch + # Trigger the workflow on push or pull request, but only for the main branch. + # Don't use pull_request.paths filter since this workflow is required for + # all pull requests on main irrespective of file type or location. + pull_request: + branches: + - main push: branches: - main paths: - "**/*.py" - pyproject.toml - - requirements-lint.txt - .github/workflows/matchers/ruff.json - - .github/workflows/ruff.yml - pull_request: - branches: - - main - # This workflow is only relevant when one of the following files changes. - # However, we have github configured to expect and require this workflow - # to run and pass before github with auto-merge a pull request. Until github - # allows more flexible auto-merge policy, we can just run this on every PR. - # It doesn't take that long to run, anyway. - #paths: - # - "**/*.py" - # - pyproject.toml - # - requirements-lint.txt - # - .github/workflows/matchers/ruff.json - # - .github/workflows/ruff.yml + - .github/workflows/lint_code.yml jobs: - ruff: + lint-code: runs-on: ubuntu-latest strategy: matrix: diff --git a/.github/workflows/doc-lint.yml b/.github/workflows/lint_docs.yml similarity index 65% rename from .github/workflows/doc-lint.yml rename to .github/workflows/lint_docs.yml index b28ae404c..9f4d5c652 100644 --- a/.github/workflows/doc-lint.yml +++ b/.github/workflows/lint_docs.yml @@ -1,19 +1,21 @@ -name: Lint documentation +name: Lint Docs on: - push: + # Trigger the workflow on push or pull request, but only for the main branch. + # Don't use pull_request.paths filter since this workflow is required for + # all pull requests on main irrespective of file type or location. + pull_request: branches: - main - paths: - - "docs/**" - pull_request: + push: branches: - main paths: + - "**/*.md" - "docs/**" jobs: - doc-lint: + lint-docs: runs-on: ubuntu-latest strategy: matrix: @@ -27,4 +29,4 @@ jobs: - name: Install dependencies run: uv sync --frozen --only-group lint - name: Lint docs - run: tools/doc-lint.sh + run: tools/lint_docs.sh diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/lint_scripts.yml similarity index 55% rename from .github/workflows/shellcheck.yml rename to .github/workflows/lint_scripts.yml index 4b1587e37..1adc858e4 100644 --- a/.github/workflows/shellcheck.yml +++ b/.github/workflows/lint_scripts.yml @@ -1,17 +1,18 @@ -name: Lint shell scripts +name: Lint Scripts + on: - push: - branches: - - "main" - paths: - - '**/*.sh' - - '.github/workflows/shellcheck.yml' + # Trigger the workflow on push or pull request, but only for the main branch. + # Don't use pull_request.paths filter since this workflow is required for + # all pull requests on main irrespective of file type or location. pull_request: + branches: + - main + push: branches: - "main" paths: - '**/*.sh' - - '.github/workflows/shellcheck.yml' + - '.github/workflows/lint_scripts.yml' env: LC_ALL: en_US.UTF-8 @@ -24,7 +25,7 @@ permissions: contents: read jobs: - shellcheck: + lint-scripts: runs-on: ubuntu-latest steps: - name: "Checkout" @@ -34,4 +35,4 @@ jobs: - name: "Check shell scripts" run: | - tools/shellcheck.sh + tools/lint_scripts.sh diff --git a/.github/workflows/matchers/actionlint.json b/.github/workflows/matchers/actionlint.json deleted file mode 100644 index 4613e1617..000000000 --- a/.github/workflows/matchers/actionlint.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "problemMatcher": [ - { - "owner": "actionlint", - "pattern": [ - { - "regexp": "^(?:\\x1b\\[\\d+m)?(.+?)(?:\\x1b\\[\\d+m)*:(?:\\x1b\\[\\d+m)*(\\d+)(?:\\x1b\\[\\d+m)*:(?:\\x1b\\[\\d+m)*(\\d+)(?:\\x1b\\[\\d+m)*: (?:\\x1b\\[\\d+m)*(.+?)(?:\\x1b\\[\\d+m)* \\[(.+?)\\]$", - "file": 1, - "line": 2, - "column": 3, - "message": 4, - "code": 5 - } - ] - } - ] -} diff --git a/.github/workflows/publish-to-test-pypi.yaml b/.github/workflows/publish_to_test_pypi.yaml similarity index 100% rename from .github/workflows/publish-to-test-pypi.yaml rename to .github/workflows/publish_to_test_pypi.yaml diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 81e7c9b05..14b1b4a1a 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -1,4 +1,4 @@ -name: 'Close inactive issues and PRs' +name: Close inactive issues and PRs on: schedule: diff --git a/.github/workflows/test-spyre.yml b/.github/workflows/test.yml similarity index 99% rename from .github/workflows/test-spyre.yml rename to .github/workflows/test.yml index 1ebc1df1d..49ce45bf7 100644 --- a/.github/workflows/test-spyre.yml +++ b/.github/workflows/test.yml @@ -13,7 +13,7 @@ on: - "tests/**/*.py" - "vllm_spyre/**/*.py" - pyproject.toml - - .github/workflows/test-spyre.yml + - .github/workflows/test.yml workflow_dispatch: env: diff --git a/.github/workflows/mypy.yaml b/.github/workflows/type_check.yaml similarity index 56% rename from .github/workflows/mypy.yaml rename to .github/workflows/type_check.yaml index 73eeacf1f..ffc3e178e 100644 --- a/.github/workflows/mypy.yaml +++ b/.github/workflows/type_check.yaml @@ -1,32 +1,23 @@ -name: mypy +name: Type Check on: - # Trigger the workflow on push or pull request, - # but only for the main branch + # Trigger the workflow on push or pull request, but only for the main branch. + # Don't use pull_request.paths filter since this workflow is required for + # all pull requests on main irrespective of file type or location. + pull_request: + branches: + - main push: branches: - main paths: - '**/*.py' - - '.github/workflows/mypy.yaml' - - 'tools/mypy.sh' + - '.github/workflows/type_check.yaml' + - 'tools/type_check.sh' - 'pyproject.toml' - pull_request: - branches: - - main - # This workflow is only relevant when one of the following files changes. - # However, we have github configured to expect and require this workflow - # to run and pass before github with auto-merge a pull request. Until github - # allows more flexible auto-merge policy, we can just run this on every PR. - # It doesn't take that long to run, anyway. - #paths: - # - '**/*.py' - # - '.github/workflows/mypy.yaml' - # - 'tools/mypy.sh' - # - 'pyproject.toml' jobs: - mypy: + type-check: runs-on: ubuntu-latest strategy: matrix: @@ -39,6 +30,7 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | + # TODO: use `uv` python -m pip install --upgrade pip pip install mypy==1.11.1 pip install types-setuptools @@ -48,4 +40,4 @@ jobs: - name: Mypy run: | echo "::add-matcher::.github/workflows/matchers/mypy.json" - tools/mypy.sh 1 ${{ matrix.python-version }} + tools/type_check.sh 1 ${{ matrix.python-version }} diff --git a/format.sh b/format.sh index 0ba95d0c8..e6629098a 100755 --- a/format.sh +++ b/format.sh @@ -110,7 +110,7 @@ echo 'vLLM yapf: Done' # Run mypy echo 'vLLM mypy:' -tools/mypy.sh +tools/type_check.sh echo 'vLLM mypy: Done' @@ -240,15 +240,15 @@ fi echo 'vLLM isort: Done' echo 'vLLM actionlint:' -tools/actionlint.sh -color +tools/lint_actions.sh -color echo 'vLLM actionlint: Done' echo 'vLLM shellcheck:' -tools/shellcheck.sh +tools/lint_scripts.sh echo 'vLLM shellcheck: Done' echo 'vLLM doc-lint:' -tools/doc-lint.sh +tools/lint_docs.sh echo 'vLLM doc-lint: Done' if ! git diff --quiet &>/dev/null; then diff --git a/pyproject.toml b/pyproject.toml index c58ae11b4..d49e5e675 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -98,7 +98,7 @@ check_untyped_defs = true follow_imports = "silent" # After fixing type errors resulting from follow_imports: "skip" -> "silent", -# move the directory here and remove it from tools/mypy.sh +# move the directory here and remove it from tools/type_check.sh files = [ ] # TODO(woosuk): Include the code from Megatron and HuggingFace. diff --git a/tools/actionlint.sh b/tools/lint_actions.sh similarity index 100% rename from tools/actionlint.sh rename to tools/lint_actions.sh diff --git a/tools/doc-lint.sh b/tools/lint_docs.sh similarity index 100% rename from tools/doc-lint.sh rename to tools/lint_docs.sh diff --git a/tools/shellcheck.sh b/tools/lint_scripts.sh similarity index 100% rename from tools/shellcheck.sh rename to tools/lint_scripts.sh diff --git a/tools/mypy.sh b/tools/type_check.sh similarity index 100% rename from tools/mypy.sh rename to tools/type_check.sh