Add project infrastructure and documentation

Infrastructure:
- Add GitHub Actions workflows (tests.yml, release.yml)
- Add CHANGELOG.md with full version history
- Add CONTRIBUTING.md with contribution guidelines
- Add RELEASE_NOTES_v1.0.0.md for v1.0.0 release

Documentation:
- Update README.md with version badge (v1.0.0)
- Update test count badge (14 tests)
- Add links to new documentation files

Features:
- CI/CD pipeline with automated testing
- Multi-OS testing (Ubuntu, macOS)
- Multi-Python version testing (3.7-3.11)
- Automated release creation on tag push
- Code coverage reporting

This completes the v1.0.0 production release setup.
This commit is contained in:
yusyus
2025-10-19 22:37:55 +03:00
parent 7aa5f0d3cb
commit 517ed46338
6 changed files with 789 additions and 1 deletions

52
.github/workflows/release.yml vendored Normal file
View File

@@ -0,0 +1,52 @@
name: Release
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests beautifulsoup4
pip install pytest
if [ -f mcp/requirements.txt ]; then pip install -r mcp/requirements.txt; fi
- name: Run tests
run: |
python -m pytest tests/ -v
- name: Extract version from tag
id: get_version
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
- name: Create Release Notes
id: release_notes
run: |
if [ -f CHANGELOG.md ]; then
# Extract changelog for this version
sed -n "/## \[${{ steps.get_version.outputs.VERSION }}\]/,/## \[/p" CHANGELOG.md | sed '$d' > release_notes.md
else
echo "Release ${{ steps.get_version.outputs.VERSION }}" > release_notes.md
fi
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
body_path: release_notes.md
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

66
.github/workflows/tests.yml vendored Normal file
View File

@@ -0,0 +1,66 @@
name: Tests
on:
push:
branches: [ main, dev ]
pull_request:
branches: [ main, dev ]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
exclude:
# Exclude some combinations to speed up CI
- os: macos-latest
python-version: '3.7'
- os: macos-latest
python-version: '3.8'
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip packages
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt', 'mcp/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests beautifulsoup4
pip install pytest pytest-cov
if [ -f mcp/requirements.txt ]; then pip install -r mcp/requirements.txt; fi
- name: Run CLI tests
run: |
python -m pytest tests/test_scraper_features.py -v
python -m pytest tests/test_config_validation.py -v
python -m pytest tests/test_integration.py -v
- name: Run MCP server tests
run: |
python -m pytest tests/test_mcp_server.py -v
- name: Generate coverage report
run: |
python -m pytest tests/ --cov=cli --cov=mcp --cov-report=xml --cov-report=term
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false