forked from keras-team/tf-keras
-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (30 loc) · 855 Bytes
/
lint.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
name: Lint
on:
push:
pull_request:
workflow_dispatch:
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
lint:
name: Check the code format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Get pip cache dir
id: pip-cache
run: |
python -m pip install --upgrade pip setuptools
echo "::set-output name=dir::$(pip cache dir)"
- name: pip cache
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
pip install black==22.3.0 isort==5.10.1 flake8==4.0.1
- name: Lint the code
run: sh shell/lint.sh