|
| 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