Skip to content

feat: Implement v2.0.0 major release with production-quality improvem… #16

feat: Implement v2.0.0 major release with production-quality improvem…

feat: Implement v2.0.0 major release with production-quality improvem… #16

Workflow file for this run

name: workflow
on:
push:
branches: [ main ]
tags: [ 'v*' ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: '3.12'
cache: 'pip'
- name: Debug environment
run: |
echo "=== Environment Debug ==="
python --version
pip --version
ls -la
echo "=== End Debug ==="
- name: Install dependencies
run: |
echo "=== Installing dependencies ==="
python -m pip install --upgrade pip
pip install -r requirements.txt
echo "=== Dependencies installed ==="
- name: Run tests and linting
run: |
echo "Running Black formatting check..."
black --check githubauthlib tests
echo "Running isort import sorting check..."
isort --check githubauthlib tests
echo "Running flake8 linting..."
flake8 githubauthlib tests
echo "Running pytest with coverage..."
pytest tests/ --cov=githubauthlib --cov-report=xml --cov-fail-under=90 -v
publish:
needs: test
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1