-
-
Notifications
You must be signed in to change notification settings - Fork 218
71 lines (58 loc) · 1.66 KB
/
lint.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Lint
on:
pull_request:
branches:
- master
permissions:
checks: write
contents: write
jobs:
lint-python:
name: Lint Python
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Check changed py files
id: changed-files
uses: tj-actions/changed-files@v41
with:
files: |
**/*.py
- name: Set up Python
uses: actions/setup-python@v4
if: ${{ steps.changed-files.outputs.all_changed_files }}
with:
python-version: 3.9
- name: Install Python dependencies
if: ${{ steps.changed-files.outputs.all_changed_files }}
run: pip install flake8
- name: Run flake8 linter
if: ${{ steps.changed-files.outputs.all_changed_files }}
uses: wearerequired/lint-action@v2
with:
flake8: true
flake8_auto_fix: false
flake8_args: ${{ steps.changed-files.outputs.all_changed_files }}
continue_on_error: false
# If this is in the same step as python linting the annotations don't show up
lint-javascript:
name: Lint Javascript
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install Node.js dependencies
run: yarn install --frozen-lockfile
- uses: sibiraj-s/action-eslint@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
annotations: true