-
Notifications
You must be signed in to change notification settings - Fork 1
77 lines (72 loc) · 2.19 KB
/
Copy pathci.yml
File metadata and controls
77 lines (72 loc) · 2.19 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test-python:
name: Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: pip install -e "./sdk/python[crypto,dev]"
- name: Lint (ruff)
run: pip install ruff && cd sdk/python && ruff check atlast_ecp/ --select E,F,W --ignore E501,E402,F401
- name: Run tests with coverage
run: |
pip install pytest-cov
cd sdk/python && python -m pytest tests/ -v --tb=short --cov=atlast_ecp --cov-report=xml
- name: Upload coverage
if: matrix.python-version == '3.12'
uses: codecov/codecov-action@v4
with:
file: sdk/python/coverage.xml
flags: python
continue-on-error: true
test-server:
name: Server Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: cd server && pip install -r requirements.txt && pip install pytest httpx
- name: Run tests
run: cd server && python -m pytest tests/ -v --tb=short
test-go:
name: Go Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.22"
- name: Run tests
run: cd sdk/go && go test ./... -v
test-typescript:
name: TypeScript (Node ${{ matrix.node-version }})
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ["18", "20", "22"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: cd sdk/typescript && npm ci
- name: Type check
run: cd sdk/typescript && npx tsc --noEmit
- name: Run tests
run: cd sdk/typescript && npm test