mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-14 20:48:00 +00:00
Use suggest-changes@v2 (https://github.com/parkerbxyz/suggest-changes/issues/36#issuecomment-2447605058) to post suggested changes as comments instead of requested changes to streamline the review process. - Also updated the script to `set +e` to ignore exit code only for the linter run. So that if there is errors in dependency installation we can still get signals.
52 lines
1.4 KiB
YAML
52 lines
1.4 KiB
YAML
# Copyright (c) ONNX Project Contributors
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
name: PR Checks
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
permissions: # set top-level default permissions as security best practice
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name == 'workflow_dispatch' }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
auto-apply-fixes:
|
|
name: Suggest fixes
|
|
runs-on: ["self-hosted", "1ES.Pool=onnxruntime-github-Ubuntu2204-AMD-CPU"]
|
|
permissions:
|
|
contents: read
|
|
pull-requests: write
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Setup Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.10"
|
|
- name: Setup Rust
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: stable
|
|
components: rustfmt
|
|
|
|
- name: Update PATH
|
|
run: |
|
|
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
|
|
|
|
- name: Install dependencies and run lintrunner on all files
|
|
run: |
|
|
python -m pip install --user -r requirements-dev.txt
|
|
python -m pip install --user lintrunner lintrunner-adapters
|
|
lintrunner init
|
|
set +e
|
|
lintrunner f --all-files -v
|
|
exit 0
|
|
- uses: parkerbxyz/suggest-changes@v2
|
|
with:
|
|
comment: 'You can commit the suggested changes from lintrunner.'
|