File tree Expand file tree Collapse file tree 3 files changed +55
-0
lines changed Expand file tree Collapse file tree 3 files changed +55
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Python Lint
2
+
3
+ on : [push, pull_request]
4
+
5
+ env :
6
+ IMAGE : ' mlcaidev/ci-cpu:8a87699'
7
+
8
+ jobs :
9
+ isort :
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+ - uses : actions/checkout@v3
13
+ with :
14
+ submodules : ' recursive'
15
+ - name : Version
16
+ run : |
17
+ wget https://raw.githubusercontent.com/mlc-ai/package/main/docker/bash.sh -O ./ci/bash.sh
18
+ chmod u+x ./ci/bash.sh
19
+ ./ci/bash.sh $IMAGE "conda env export --name ci-lint"
20
+ - name : Lint
21
+ run : |
22
+ ./ci/bash.sh $IMAGE bash ./ci/task/isort.sh
23
+
24
+ black :
25
+ runs-on : ubuntu-latest
26
+ steps :
27
+ - uses : actions/checkout@v3
28
+ with :
29
+ submodules : ' recursive'
30
+ - name : Version
31
+ run : |
32
+ wget https://raw.githubusercontent.com/mlc-ai/package/main/docker/bash.sh -O ./ci/bash.sh
33
+ chmod u+x ./ci/bash.sh
34
+ ./ci/bash.sh $IMAGE "conda env export --name ci-lint"
35
+ - name : Lint
36
+ run : |
37
+ ./ci/bash.sh $IMAGE bash ./ci/task/black.sh
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ set -eo pipefail
3
+
4
+ source ~ /.bashrc
5
+ micromamba activate ci-lint
6
+ NUM_THREADS=$( nproc)
7
+
8
+ black --check --workers $NUM_THREADS ./python/
9
+ black --check --workers $NUM_THREADS ./tests/python
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ set -eo pipefail
3
+
4
+ source ~ /.bashrc
5
+ micromamba activate ci-lint
6
+ NUM_THREADS=$( nproc)
7
+
8
+ isort --check-only -j $NUM_THREADS --profile black ./python/
9
+ isort --check-only -j $NUM_THREADS --profile black ./tests/python/
You can’t perform that action at this time.
0 commit comments