a b/.github/workflows/lint.yml
1
name: lint
2
3
on: [push, pull_request]
4
5
concurrency:
6
  group: ${{ github.workflow }}-${{ github.ref }}
7
  cancel-in-progress: true
8
9
jobs:
10
  lint:
11
    runs-on: ubuntu-18.04
12
    steps:
13
      - uses: actions/checkout@v2
14
      - name: Set up Python 3.7
15
        uses: actions/setup-python@v2
16
        with:
17
          python-version: 3.7
18
      - name: Install pre-commit hook
19
        run: |
20
          pip install pre-commit
21
          pre-commit install
22
      - name: Linting
23
        run: |
24
          sudo apt-add-repository ppa:brightbox/ruby-ng -y
25
          sudo apt-get update
26
          sudo apt-get install -y ruby2.7
27
          pre-commit run --all-files
28
      - name: Check docstring coverage
29
        run: |
30
          pip install interrogate
31
          interrogate -v --ignore-init-method --ignore-module --ignore-nested-functions --exclude mmseg/ops --ignore-regex "__repr__" --fail-under 80 mmseg