Skip to content

add oxylabs ai studio tools #103

add oxylabs ai studio tools

add oxylabs ai studio tools #103

Workflow file for this run

name: Lint & Test
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: write
jobs:
lint_and_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v3
with:
python-version: "3.12"
- name: Install uv
run: |
pip install uv
- name: Install dependencies
run: |
uv sync
- name: Run linters
run: |
uv run black --check .
uv run mypy src
uv run ruff check .
- name: Run tests
run: |
uv run pytest --cov=src --cov-report xml --cov-report term --cov-fail-under=90 tests/unit tests/integration
- name: Generate coverage badge
run: |
pip install "genbadge[coverage]"
genbadge coverage -i coverage.xml -o coverage-badge.svg
- name: Upload coverage report artifact
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: coverage.xml
- name: Upload coverage badge artifact
uses: actions/upload-artifact@v4
with:
name: coverage-badge
path: coverage-badge.svg
- name: Deploy coverage report to branch
if: github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v4
with:
publish_branch: 'coverage'
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: .
keep_files: coverage-badge.svg
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
commit_message: 'chore: Update coverage data from workflow run ${{ github.event.workflow_run.id }}'