-
Notifications
You must be signed in to change notification settings - Fork 3k
49 lines (44 loc) · 1.24 KB
/
pr_checks.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# 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: ubuntu-latest
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: Install dependencies
run: |
python -m pip install -r requirements-dev.txt
python -m pip install lintrunner lintrunner-adapters
lintrunner init
- name: Run lintrunner on all files
run: |
set +e
lintrunner f --all-files -v
exit 0
- uses: parkerbxyz/suggest-changes@v1
with:
comment: 'You can commit the suggested changes from lintrunner.'