Repository navigation
59 lines (50 loc) · 1.65 KB
/
Copy pathtest.yml
File metadata and controls
59 lines (50 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Test
on:
push:
branches: [main]
pull_request:
types: [opened, synchronize, reopened]
jobs:
test:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
python-version: ['3.12', '3.13', '3.14']
permissions:
contents: read
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
- name: Install dependencies
run: |
uv sync --all-extras
- name: Run Tests
run: |
uv run pytest tests/ -v
- name: Run Lint
run: |
uv run ruff check .
uv run ruff format --check .
- name: Run type checking
run: |
uv run basedpyright
- name: GraphQL codegen drift gate
run: |
# Regenerate typed models from the checked-in schema + operations
# and fail if the result differs from what's committed. Keeps
# generated/ honest against schema.graphql and operations/*.graphql.
bin/generate-graphql.sh
if [ -n "$(git status --porcelain robosystems_client/graphql/generated/)" ]; then
git status --porcelain robosystems_client/graphql/generated/
git diff robosystems_client/graphql/generated/ | head -100
echo "::error::Generated GraphQL models are stale — run 'just generate-graphql' and commit the result."
exit 1
fi