Skip to content

trigger ci test

trigger ci test #51

Workflow file for this run

name: Tests
on:
push:
branches: [ main, master, develop ]
pull_request:
branches: [ main, master, develop ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run tests with coverage
run: |
pytest test_git_commitai.py --cov --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
integration-test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.10']
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Configure git
run: |
git config --global user.email "test@example.com"
git config --global user.name "Test User"
- name: Test script execution
run: |
python git_commitai.py --help || true
- name: Test in git repository
run: |
# Create a test file
echo "test" > test.txt
git add test.txt
# Set up mock API key
export GIT_COMMIT_AI_KEY="test-key"
export GIT_COMMIT_AI_URL="https://api.example.com"
# Test that script recognizes staged changes
python git_commitai.py --help || true