Skip to content
43 changes: 29 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,19 @@ on: [push, pull_request]

jobs:
ci:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ['3.12', '3.13', '3.14']
task: [check, test, format]
name: ${{ matrix.task }} (py ${{ matrix.python-version }})
exclude:
- os: windows-latest
python-version: '3.13'
- os: windows-latest
python-version: '3.14'
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} ${{ matrix.task }} (py ${{ matrix.python-version }})

steps:
- uses: actions/checkout@v4
Expand All @@ -21,18 +27,27 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: Install uv
uses: astral-sh/setup-uv@v7

- name: Install Dependencies
shell: bash
run: |
uv sync --extra dev

- name: Run Check
shell: bash
if: matrix.task == 'check'
run: |
uv run pyright typeagent test tools gmail

- name: Run Format
shell: bash
if: matrix.task == 'format'
run: |
set -euxo pipefail
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.local/bin" >> $GITHUB_PATH
uv run black -tpy312 -tpy313 -tpy314 typeagent test tools gmail demo --check

- name: Select command
- name: Run Test
shell: bash
if: matrix.task == 'test'
run: |
case "${{ matrix.task }}" in
check) echo "CMD=make check" >> $GITHUB_ENV ;;
test) echo "CMD=make test" >> $GITHUB_ENV ;;
format) echo "CMD=make format FLAGS=--check" >> $GITHUB_ENV ;;
esac

- name: Run
run: $CMD
uv run pytest
Loading