Skip to content

Commit 3f54c6f

Browse files
author
fevra-dev
committed
✨ Add GitHub Actions CI/CD & clean up docs
CI/CD Pipeline: - Multi-version Python testing (3.9-3.12) - Lint checks with ruff - Type checking with mypy - Security scanning with Bandit & Safety - Package build & artifact upload - Automated releases on tags Docs cleanup: - Keep only essential docs (USAGE.md, README_ADVANCED.md) - Remove redundant documentation - Update GitHub URLs
1 parent 08f42b7 commit 3f54c6f

6 files changed

Lines changed: 144 additions & 969 deletions

File tree

.github/workflows/ci.yml

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main, develop]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
python-version: ["3.9", "3.10", "3.11", "3.12"]
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Set up Python ${{ matrix.python-version }}
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
25+
- name: Cache pip dependencies
26+
uses: actions/cache@v4
27+
with:
28+
path: ~/.cache/pip
29+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements*.txt') }}
30+
restore-keys: |
31+
${{ runner.os }}-pip-
32+
33+
- name: Install dependencies
34+
run: |
35+
python -m pip install --upgrade pip
36+
pip install -r requirements.txt
37+
pip install -r requirements-dev.txt
38+
39+
- name: Lint with ruff
40+
run: |
41+
pip install ruff
42+
ruff check gitexpose/ --ignore E501
43+
44+
- name: Type check with mypy
45+
run: |
46+
pip install mypy
47+
mypy gitexpose/ --ignore-missing-imports --no-error-summary || true
48+
49+
- name: Run tests
50+
run: |
51+
pytest tests/ -v --tb=short
52+
53+
security:
54+
runs-on: ubuntu-latest
55+
steps:
56+
- uses: actions/checkout@v4
57+
58+
- name: Set up Python
59+
uses: actions/setup-python@v5
60+
with:
61+
python-version: "3.11"
62+
63+
- name: Install dependencies
64+
run: |
65+
python -m pip install --upgrade pip
66+
pip install bandit safety
67+
68+
- name: Security scan with Bandit
69+
run: |
70+
bandit -r gitexpose/ -ll --skip B101 || true
71+
72+
- name: Check dependencies with Safety
73+
run: |
74+
pip install -r requirements.txt
75+
safety check || true
76+
77+
build:
78+
runs-on: ubuntu-latest
79+
needs: test
80+
steps:
81+
- uses: actions/checkout@v4
82+
83+
- name: Set up Python
84+
uses: actions/setup-python@v5
85+
with:
86+
python-version: "3.11"
87+
88+
- name: Install build tools
89+
run: |
90+
python -m pip install --upgrade pip
91+
pip install build twine
92+
93+
- name: Build package
94+
run: python -m build
95+
96+
- name: Check package
97+
run: twine check dist/*
98+
99+
- name: Upload artifacts
100+
uses: actions/upload-artifact@v4
101+
with:
102+
name: dist
103+
path: dist/

.github/workflows/release.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Set up Python
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: "3.11"
21+
22+
- name: Install build tools
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install build
26+
27+
- name: Build package
28+
run: python -m build
29+
30+
- name: Create GitHub Release
31+
uses: softprops/action-gh-release@v1
32+
with:
33+
files: dist/*
34+
generate_release_notes: true
35+
draft: false
36+
prerelease: ${{ contains(github.ref, 'alpha') || contains(github.ref, 'beta') }}
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

docs/README_ADVANCED.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ These modules are built on current threat intelligence:
300300
pip install gitexpose[advanced]
301301

302302
# Or install from source
303-
git clone https://github.com/yourusername/gitexpose.git
303+
git clone https://github.com/fevra-dev/GitExpose.git
304304
cd gitexpose
305305
pip install -e ".[advanced]"
306306
```
@@ -383,6 +383,6 @@ Contributions welcome! Areas of interest:
383383

384384
**Built for the security researchers defending against 2025's $10.5 trillion cybercrime economy**
385385

386-
[Report Bug](https://github.com/yourusername/gitexpose/issues) · [Request Feature](https://github.com/yourusername/gitexpose/issues)
386+
[Report Bug](https://github.com/fevra-dev/GitExpose/issues) · [Request Feature](https://github.com/fevra-dev/GitExpose/issues)
387387

388388
</div>

0 commit comments

Comments
 (0)