Skip to content

Commit fbf5abb

Browse files
cursoragentkhnumdev
andcommitted
Enhance CI/CD workflows with linting, security checks, and release configuration
Co-authored-by: isisosirishorus <[email protected]>
1 parent 953df96 commit fbf5abb

File tree

4 files changed

+55
-14
lines changed

4 files changed

+55
-14
lines changed

.github/workflows/pr.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,22 @@ jobs:
1414
- uses: actions/setup-python@v5
1515
with:
1616
python-version: ${{ matrix.python-version }}
17+
cache: 'pip'
1718
- name: Install
1819
run: |
1920
python -m pip install -U pip
2021
python -m pip install .
21-
python -m pip install pytest
22+
python -m pip install pytest ruff black build pip-audit
23+
- name: Lint
24+
run: |
25+
ruff check .
26+
black --check .
2227
- name: Test
23-
run: pytest -q
28+
run: pytest -q
29+
- name: Build and verify
30+
run: |
31+
python -m build
32+
twine check dist/* || true
33+
- name: Security audit
34+
run: |
35+
pip-audit -r requirements.txt || true

.github/workflows/release.yml

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,36 @@ jobs:
88
release:
99
runs-on: ubuntu-latest
1010
permissions:
11-
contents: write # to push tags and release notes
12-
id-token: write # for PyPI trusted publishing (optional)
11+
contents: write
12+
id-token: write
1313
steps:
1414
- uses: actions/checkout@v4
1515
with:
16-
fetch-depth: 0 # full history for semantic-release
16+
fetch-depth: 0
1717
- uses: actions/setup-python@v5
1818
with:
1919
python-version: '3.11'
20-
- name: Install build and release tooling
20+
cache: 'pip'
21+
- name: Install
2122
run: |
2223
python -m pip install -U pip
2324
python -m pip install .
24-
python -m pip install build python-semantic-release
25-
- name: Run tests
25+
python -m pip install pytest ruff black build python-semantic-release pip-audit
26+
- name: Lint
2627
run: |
27-
python -m pip install pytest
28-
pytest -q
29-
- name: Semantic Release
28+
ruff check .
29+
black --check .
30+
- name: Test
31+
run: pytest -q
32+
- name: Build and verify
33+
run: |
34+
python -m build
35+
twine check dist/* || true
36+
- name: Security audit
37+
run: |
38+
pip-audit -r requirements.txt || true
39+
- name: Semantic Release (version, tag, GitHub release, PyPI)
3040
env:
3141
PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
3242
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33-
run: |
34-
semantic-release publish
43+
run: semantic-release publish

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,3 +205,10 @@ cython_debug/
205205
marimo/_static/
206206
marimo/_lsp/
207207
__marimo__/
208+
209+
# Local configuration
210+
config.yaml
211+
212+
# Editor/OS
213+
.DS_Store
214+
Thumbs.db

pyproject.toml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,17 @@ include = ["gcd_tools*"]
4444
line-length = 100
4545

4646
[tool.ruff]
47-
line-length = 100
47+
line-length = 100
48+
49+
[tool.semantic_release]
50+
version_variable = "pyproject.toml:version"
51+
branch = "main"
52+
upload_to_pypi = true
53+
dist_path = "dist"
54+
build_command = "python -m build"
55+
commit_message = "chore(release): {version} [skip ci]"
56+
changelog_sections = "feature,fix,perf,refactor,docs,style,build,ci,chore"
57+
58+
[tool.semantic_release.remote]
59+
name = "origin"
60+
repo_url = "https://github.com/your-org/local-storage-utils"

0 commit comments

Comments
 (0)