-
Notifications
You must be signed in to change notification settings - Fork 4
58 lines (49 loc) · 1.6 KB
/
Copy pathci.yml
File metadata and controls
58 lines (49 loc) · 1.6 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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.11', '3.12']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
if python3 -c "import sys; exit(0 if sys.version_info >= (3, 10) else 1)"; then
pip install -e ".[dev,solana]"
else
pip install -e ".[dev]"
fi
- name: Check formatting
run: black --check .
- name: Lint
run: ruff check .
- name: Run unit tests
run: |
if python3 -c "import sys; exit(0 if sys.version_info >= (3, 10) else 1)"; then
pytest tests/unit
else
pytest tests/unit --ignore=tests/unit/test_solana_client.py --ignore=tests/unit/test_solana_wallet.py -k "not SolanaX402"
fi
# Fails when a number in the docs disagrees with brand-numbers.json.
# Offline by design: it reads the committed snapshot and never fetches, so a
# blockrun.ai deploy in progress cannot fail this repo's CI. Its own job
# rather than a step, so it does not run three times across the Python matrix.
brand-numbers:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
- run: node scripts/sync-brand-numbers.mjs --check