8000 lint - openai client protocol (#2) · pgrayy/sdk-python@8167c2d · GitHub
[go: up one dir, main page]

Skip to content

lint - openai client protocol (#2) #3

lint - openai client protocol (#2)

lint - openai client protocol (#2) #3

Workflow file for this run

name: Test and Lint
on:
pull_request: # Safer than pull_request_target for untrusted code
branches: [ main ]
types: [opened, synchronize, reopened, ready_for_review, review_requested, review_request_removed]
push:
branches: [ main ] # Also run on direct pushes to main
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
unit-test:
name: Unit Tests - Python ${{ matrix.python-version }} - ${{ matrix.os-name }}
permissions:
contents: read
strategy:
matrix:
include:
# Linux
- os: ubuntu-latest
os-name: 'linux'
python-version: "3.10"
- os: ubuntu-latest
os-name: 'linux'
python-version: "3.11"
- os: ubuntu-latest
os-name: 'linux'
python-version: "3.12"
- os: ubuntu-latest
os-name: 'linux'
python-version: "3.13"
# Windows
- os: windows-latest
os-name: 'windows'
python-version: "3.10"
- os: windows-latest
os-name: 'windows'
python-version: "3.11"
- os: windows-latest
os-name: 'windows'
python-version: "3.12"
- os: windows-latest
os-name: 'windows'
python-version: "3.13"
# MacOS - latest only; not enough runners for macOS
- os: macos-latest
os-name: 'macOS'
python-version: "3.13"
fail-fast: true
runs-on: ${{ matrix.os }}
env:
LOG_LEVEL: DEBUG
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }} # Explicitly define which commit to check out
persist-credentials: false # Don't persist credentials for subsequent actions
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install --no-cache-dir hatch
- name: Run Unit tests
id: tests
run: hatch test tests --cover
continue-on-error: false
lint:
name: Lint
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
- name: Install dependencies
run: |
pip install --no-cache-dir hatch
- name: Run lint
id: lint
run: hatch run test-lint
continue-on-error: false
0