Skip to content

chore(deps): pin dependencies #51

chore(deps): pin dependencies

chore(deps): pin dependencies #51

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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
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 }}