forked from streamlink/streamlink
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (49 loc) · 1.53 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
name: Lint
on:
pull_request: {}
jobs:
files:
name: Files
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- name: File permissions
run: "! grep -Ev '^644' <(git ls-files src/ tests/ | xargs stat '--format=%a %n')"
- name: File encodings
run: "! grep -E -e 'UTF-[^8]' -e 'UTF-[^ ]+ \\(with BOM\\)' <(git ls-files src/ tests/ | xargs stat '--format=%a %n')"
- name: Line terminators
run: "! grep 'with CRLF line terminators' <(git ls-files | file -nNf-)"
- name: No unicode bidirectional control characters
run: "! git grep -EIn $'[\\u2066\\u2067\\u2068\\u2069\\u202A\\u202B\\u202C\\u202D\\u202E]'"
style:
name: Code style
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install dependencies
run: ./script/install-dependencies.sh
- name: ruff
run: >
python -m ruff .
typing:
name: Typing
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install dependencies
run: |
./script/install-dependencies.sh
python -m pip install -r docs-requirements.txt
- name: mypy
run: |
python -m mypy --no-incremental
python -m mypy --no-incremental --python-version 3.8 docs