-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (41 loc) · 1.11 KB
/
ci-python.yml
File metadata and controls
52 lines (41 loc) · 1.11 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
name: Python CI
on:
pull_request:
paths:
- packages/sdk-py/**
- .github/workflows/ci-python.yml
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
check:
name: Lint, Format & Test
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/sdk-py
steps:
- uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: poetry
- name: Install dependencies
working-directory: packages/sdk-py
run: poetry install
- name: Check formatting
working-directory: packages/sdk-py
run: poetry run black --check .
- name: Lint
working-directory: packages/sdk-py
run: poetry run ruff check .
- name: Type check
working-directory: packages/sdk-py
run: poetry run mypy src
- name: Test
working-directory: packages/sdk-py
run: poetry run pytest