-
Notifications
You must be signed in to change notification settings - Fork 20
45 lines (41 loc) · 1.18 KB
/
py.yaml
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
name: Python checks
env:
ONEFLOW_SRC: oneflow-src
on:
pull_request:
types: [review_requested]
branches:
- "*"
workflow_dispatch:
inputs:
placeholder:
description: "placeholder, no effect"
required: false
jobs:
check_license_and_format:
name: License and format
runs-on: ubuntu-18.04
if: github.event.pull_request.draft == false && contains(github.event.pull_request.requested_reviewers.*.login, 'oneflow-ci-bot')
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
# flake8-bugbear flake8-comprehensions are useful but not available internally
run: |
python -m pip install --upgrade pip
python -m pip install flake8==3.8.1 isort==5.10.1
python -m pip install black==21.4b2
python -m pip install click==8.0.2
flake8 --version
- name: Lint
id: py_check
run: |
black -l 200 --check .
flake8 .
- name: Please request CI again
if: ${{ failure() }}
run: |
exit 1