From 36ade61180c0485f7901b3cc6a8d9a219af56741 Mon Sep 17 00:00:00 2001 From: krishna fattepurkar Date: Thu, 1 Jan 2026 15:14:22 +0530 Subject: [PATCH 1/3] chore: add CI, contributing guide, and PR template --- .github/pull_request_template.md | 12 ++++++++++++ .github/workflows/ci.yml | 19 +++++++++++++++++++ CONTRIBUTING.md | 17 +++++++++++++++++ 3 files changed, 48 insertions(+) create mode 100644 .github/pull_request_template.md create mode 100644 .github/workflows/ci.yml create mode 100644 CONTRIBUTING.md diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..3e83e0f --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,12 @@ +## Summary +What does this PR do? + +## Type +- [ ] Feature +- [ ] Fix +- [ ] Docs +- [ ] CI + +## Testing +- [ ] Tested locally +- [ ] Tests added diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..5cb7ab0 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,19 @@ +name: CI + +on: + pull_request: + branches: [ main ] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.10' + - run: | + pip install -e . + pip install pytest flake8 + - run: flake8 shieldcommit + - run: pytest diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..b0f6ea7 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,17 @@ +# Contributing to ShieldCommit + +## Branch Rules +- main → stable only +- feature/* → new features +- fix/* → bug fixes +- docs/* → documentation + +## Workflow +1. Fork repo +2. Create branch from main +3. Open PR to main +4. CI must pass + +## Run locally +pip install -e . +pytest From 838e5dbcc2c8394a3cc41f39a58f2da9c46bcd16 Mon Sep 17 00:00:00 2001 From: krishna fattepurkar Date: Thu, 1 Jan 2026 15:28:00 +0530 Subject: [PATCH 2/3] chore: add CI, contributing guide, and PR template --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5cb7ab0..557122a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,5 +15,5 @@ jobs: - run: | pip install -e . pip install pytest flake8 - - run: flake8 shieldcommit + - run: flake8 src - run: pytest From 8950b321cd5ff8a6f12a32c888df5372cb3b01da Mon Sep 17 00:00:00 2001 From: krishna fattepurkar Date: Thu, 1 Jan 2026 15:38:53 +0530 Subject: [PATCH 3/3] chore: add CI, contributing guide, and PR template --- .github/workflows/ci.yml | 37 ++++++++++++++++++++++++++++--------- 1 file changed, 28 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 557122a..7665965 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,19 +1,38 @@ -name: CI +name: ShieldCommit CI on: pull_request: - branches: [ main ] + push: + branches: [main] jobs: test: runs-on: ubuntu-latest + steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 with: - python-version: '3.10' - - run: | + python-version: "3.10" + + - name: Install dependencies + run: | + python -m pip install --upgrade pip pip install -e . - pip install pytest flake8 - - run: flake8 src - - run: pytest + pip install -r requirements.txt || true + + - name: Verify CLI loads + run: | + shieldcommit --help + + - name: Run tests (if available) + run: | + if [ -d tests ]; then + pip install pytest + pytest + else + echo "No tests directory, skipping tests" + fi