Skip to content

Commit d68da21

Browse files
committed
feat: added to ci actions
1 parent 3baa1e8 commit d68da21

3 files changed

Lines changed: 58 additions & 14 deletions

File tree

.github/workflows/ci.yml

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,34 +5,44 @@ on:
55
pull_request:
66

77
concurrency:
8-
group: frc-ci-${{ github.ref }}
8+
group: ci-${{ github.ref }}
99
cancel-in-progress: true
1010

1111
permissions:
1212
contents: read
1313

1414
jobs:
15-
ruff:
15+
ci:
1616
runs-on: ubuntu-latest
17+
1718
steps:
1819
- uses: actions/checkout@v4
1920

2021
- uses: actions/setup-python@v5
2122
with:
2223
python-version: "3.12"
24+
cache: pip
2325

24-
- name: Ruff (Python linter and code formatter)
26+
- name: Install dependencies
2527
run: |
26-
curl -LsSf https://astral.sh/uv/install.sh | sh
27-
uv tool install ruff@latest
28-
ruff check
28+
python -m pip install --upgrade pip
29+
pip install -r requirements-dev.txt
30+
pip install -e .
2931
30-
- name: MyPy(Static Typing for Python)
31-
run: |
32-
python3 -m pip install -U mypy
33-
mypy ./
32+
- name: Ruff (lint)
33+
run: ruff check .
3434

35-
- name: Python build
36-
run: |
37-
python3 -m build
38-
35+
- name: Ruff (format check)
36+
run: ruff format --check .
37+
38+
- name: MyPy (typing)
39+
run: mypy .
40+
41+
- name: Bandit (static security)
42+
run: bandit -q -r SecureShell_Password_Manager
43+
44+
- name: pip-audit (dependency vulnerabilities)
45+
run: pip-audit
46+
47+
- name: Build (sdist + wheel)
48+
run: python -m build

pyproject.toml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
[tool.ruff]
2+
line-length = 88
3+
target-version = "py312"
4+
5+
# While scaffolded, ignore the most common placeholder triggers:
6+
# F401 = unused imports, F841 = assigned but unused
7+
# You can remove these later as the project matures.
8+
lint.select = ["E", "F"]
9+
lint.ignore = ["F401", "F841"]
10+
11+
# If you want to “lock down” just syntax+fatal errors for now, use:
12+
# lint.select = ["E9", "F63", "F7", "F82"]
13+
14+
[tool.ruff.lint.per-file-ignores]
15+
# If some modules are mostly skeletons, you can loosen them specifically:
16+
"SecureShell_Password_Manager/auth.py" = ["F401"]
17+
"SecureShell_Password_Manager/storage.py" = ["F401"]
18+
"SecureShell_Password_Manager/tui.py" = ["F401"]
19+
20+
[tool.mypy]
21+
python_version = "3.12"
22+
# This is the big one for 3rd party libs like cryptography:
23+
ignore_missing_imports = true
24+
25+
# While scaffolded, don’t fail the whole build over typing yet:
26+
warn_unused_ignores = true
27+
warn_redundant_casts = true
28+
pretty = true

requirments-dev.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
ruff
2+
mypy
3+
build
4+
pip-audit
5+
bandit
6+
pytest

0 commit comments

Comments
 (0)