-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (48 loc) · 1.54 KB
/
ci.yml
File metadata and controls
60 lines (48 loc) · 1.54 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
60
name: CI
# Lint / type / test on PRs and pushes to the public mirror
# (KashDAO/protocol-sdk-python). External contributors get fast
# feedback here; the project's full CI also runs internally on a
# private monorepo before each release sync.
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
lint-type-test:
name: Lint, type, test
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.11', '3.12', '3.13']
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: pyproject.toml
- name: Install
run: |
python -m pip install --upgrade pip
pip install -e '.[dev]'
- name: Ruff lint
run: ruff check kashdao_protocol_sdk tests
- name: Ruff format check
run: ruff format --check kashdao_protocol_sdk tests
- name: Mypy
run: mypy kashdao_protocol_sdk
- name: Pytest (unit, no integration / e2e / parity)
env:
PYTHONDONTWRITEBYTECODE: '1'
run: pytest -m 'not integration and not e2e and not parity' -ra --strict-markers