File tree Expand file tree Collapse file tree 3 files changed +245
-5
lines changed
Expand file tree Collapse file tree 3 files changed +245
-5
lines changed Original file line number Diff line number Diff line change 1+ name : Cargo CI
2+
3+ on :
4+ push :
5+ branches : master
6+ paths :
7+ - cargo/**
8+ pull_request :
9+ branches : master
10+ paths :
11+ - cargo/**
12+
13+ defaults :
14+ run :
15+ working-directory : cargo
16+
17+ jobs :
18+ ci :
19+ permissions :
20+ contents : read
21+ runs-on : ubuntu-latest
22+ timeout-minutes : 30
23+ steps :
24+ # 4.2.2
25+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
26+ with :
27+ persist-credentials : false
28+
29+ - name : Setup Poetry
30+ run : |
31+ curl -sSL https://install.python-poetry.org | python3 -
32+ sudo ln -s /github/home/.local/bin/poetry /usr/bin/poetry
33+
34+ - name : Install python dependencies
35+ run : poetry sync --all-groups --all-extras
36+
37+ - name : Check code formatting
38+ run : poetry run ruff format --check
39+
40+ - name : Lint
41+ run : poetry run ruff check --output-format=github
42+
43+ - name : Check python types
44+ run : poetry run mypy .
Original file line number Diff line number Diff line change @@ -7,9 +7,44 @@ version = "0.0.1"
77description = " Script to generate flatpak-builder manifest from Cargo lockfiles"
88license = {text = " MIT" }
99readme = " README.md"
10- requires-python = " <4.0,>=3.8 "
10+ requires-python = " <4.0,>=3.9 "
1111dependencies = [
1212 " aiohttp<4.0.0,>=3.9.5" ,
1313 " toml<1.0.0,>=0.10.2" ,
1414 " PyYAML<7.0.0,>=6.0.2" ,
1515]
16+
17+ [tool .poetry .group .dev .dependencies ]
18+ ruff = " ^0.6.7"
19+ mypy = " ^1.11.2"
20+ types-toml = " ^0.10.8"
21+ types-pyyaml = " ^6.0.12"
22+
23+ [tool .ruff ]
24+ line-length = 88
25+ include = [" *.py" ]
26+ target-version = " py39"
27+
28+ [tool .ruff .lint ]
29+ preview = true
30+ extend-select = [
31+ " B" ,
32+ " ERA" ,
33+ " I" ,
34+ " PLE" ,
35+ " PLW" ,
36+ " W" ,
37+ ]
38+
39+ [tool .ruff .format ]
40+ line-ending = " lf"
41+ quote-style = " double"
42+
43+ [tool .mypy ]
44+ disallow_untyped_defs = true
45+ disallow_any_unimported = true
46+ no_implicit_optional = true
47+ check_untyped_defs = true
48+ warn_unused_ignores = true
49+ show_error_codes = true
50+ warn_return_any = true
You can’t perform that action at this time.
0 commit comments