Skip to content

chore: update lints #43

chore: update lints

chore: update lints #43

Workflow file for this run

name: test
on:
push:
branches:
- main
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
PYTHONUNBUFFERED: "1"
FORCE_COLOR: "1"
HATCH_VERBOSE: "1"
jobs:
test:
name: >
${{ matrix.directory == '.' && 'Core' || matrix.directory == 'pypacter-api' && 'API' || 'CLI' }}
Python ${{ matrix.python-version }}
on ${{ startsWith(matrix.os, 'macos-') && 'macOS' || startsWith(matrix.os, 'windows-') && 'Windows' || 'Linux' }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.11", "3.12"]
directory: [".", "pypacter-api"]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install Hatch
run: pip install --upgrade hatch
- name: Run lints
working-directory: ${{ matrix.directory}}
run: |
hatch run format --check
hatch run lint
hatch run typecheck
- name: Run tests
working-directory: ${{ matrix.directory}}
run: |
hatch run test
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}