Skip to content

Commit 9766a39

Browse files
authored
chore(ci): add CI action and fixed pylint error (#10)
* add pylintrc * Create ci.yml * fix typo in shufflenet * add CI badge
1 parent 1e7e902 commit 9766a39

File tree

13 files changed

+682
-19
lines changed

13 files changed

+682
-19
lines changed

.github/workflows/ci.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: CI
4+
5+
# Controls when the action will run. Triggers the workflow on push or pull request
6+
# events but only for the master branch
7+
on:
8+
push:
9+
branches: [ master ]
10+
pull_request:
11+
branches: [ master ]
12+
13+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
14+
jobs:
15+
# This workflow contains a single job called "build"
16+
build:
17+
# The type of runner that the job will run on
18+
runs-on: ubuntu-latest
19+
strategy:
20+
matrix:
21+
python-version: [3.5, 3.6, 3.7, 3.8]
22+
23+
# Steps represent a sequence of tasks that will be executed as part of the job
24+
steps:
25+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
26+
- uses: actions/checkout@v2
27+
28+
- name: Set up Python ${{ matrix.python-version }}
29+
uses: actions/setup-python@v1
30+
with:
31+
python-version: ${{ matrix.python-version }}
32+
33+
- name: Install dependencies
34+
run: |
35+
python -m pip install --upgrade pip
36+
pip install -r requirements.txt
37+
pip install megengine -f https://megengine.org.cn/whl/mge.html
38+
39+
# Runs a set of commands using the runners shell
40+
- name: Pylint check
41+
run: |
42+
export PYTHONPATH=$PWD:$PYTHONPATH
43+
pip install pylint
44+
pylint official/vision --rcfile=.pylintrc || pylint_ret=$?
45+
echo test, and deploy your project.
46+
if [ "$pylint_ret" ]; then
47+
exit $pylint_ret
48+
fi
49+
echo "All lint steps passed!"
50+

0 commit comments

Comments
 (0)