forked from learningequality/kolibri
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (41 loc) · 995 Bytes
/
python2lint.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
35
36
37
38
39
40
41
42
43
name: Python 2 linting
on:
push:
branches:
- develop
- 'release-v**'
pull_request:
branches:
- develop
- 'release-v**'
jobs:
pre_job:
name: Path match check
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
github_token: ${{ github.token }}
paths: '["kolibri/**/*.py"]'
lint:
name: Python 2 syntax checking
needs: pre_job
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Set up Python 2.7
uses: actions/setup-python@v4
with:
python-version: 2.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8
- name: Lint with flake8
run: |
flake8 kolibri