-
Notifications
You must be signed in to change notification settings - Fork 0
89 lines (89 loc) · 2.83 KB
/
ci.yml
File metadata and controls
89 lines (89 loc) · 2.83 KB
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: CI
on: push
permissions: {}
jobs:
# Setting PYTHON_RUFF_CONFIG_FILE to an empty string makes Super-Linter run
# Ruff with the default .ruff.toml instead of passing empty string into Ruff
# --config option. This changes Ruff behavior, which makes it ignore
# configuration in project subdirectories. Making /.github/linters/.ruff.toml
# empty doesn't change the Ruff behavior.
# Hence, a separate job needs to be run for each component. See:
# https://github.com/super-linter/super-linter/issues/7544
super-linter:
name: Super-Linter
runs-on: ubuntu-latest
permissions:
contents: read
statuses: write
strategy:
fail-fast: false
matrix:
component:
- all
- bookmarkmgr
- bookmarks4diff
- ytm
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
persist-credentials: false
- name: Register variables
id: vars
run: >-
{
echo "pyproject-toml-path=${{
matrix.component != 'all'
&& format(
'../../../github/workspace/{0}/pyproject.toml',
matrix.component
)
|| ''
}}"
} >> "${GITHUB_OUTPUT}"
- uses: super-linter/super-linter/slim@v8.5.0
env:
FILTER_REGEX_EXCLUDE: >-
^${{
matrix.component == 'all'
&& '/github/workspace/(bookmarkmgr|bookmarks4diff|ytm)/'
|| '$'
}}
FILTER_REGEX_INCLUDE: >-
${{
matrix.component != 'all'
&& format('^/github/workspace/{0}/', matrix.component)
|| ''
}}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PYTHON_MYPY_CONFIG_FILE: ${{ steps.vars.outputs.pyproject-toml-path }}
PYTHON_RUFF_CONFIG_FILE: ${{ steps.vars.outputs.pyproject-toml-path }}
PYTHON_RUFF_FORMAT_CONFIG_FILE: >-
${{ steps.vars.outputs.pyproject-toml-path }}
VALIDATE_PYTHON_BLACK: false
VALIDATE_PYTHON_FLAKE8: false
VALIDATE_PYTHON_ISORT: false
VALIDATE_PYTHON_MYPY: ${{ matrix.component != 'bookmarkmgr' && '' }}
VALIDATE_PYTHON_PYINK: false
VALIDATE_PYTHON_PYLINT: false
mypy:
name: Mypy
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
component:
- bookmarkmgr
defaults:
run:
working-directory: ${{ matrix.component }}
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- run: sudo apt-get update
- run: sudo apt-get install -y --no-install-recommends python3-poetry
- name: Don't build native modules
run: echo > build.py
- run: poetry install
- run: poetry run mypy .