forked from Echo-Mirror-Butler/echomirror-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (56 loc) · 1.7 KB
/
Copy pathpython-ci.yml
File metadata and controls
63 lines (56 loc) · 1.7 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
name: Python SDK CI
on:
push:
branches: [main]
paths:
- "crates/echomirror-python/**"
- "crates/echomirror-core/**"
- "crates/echomirror-stellar/**"
- ".github/workflows/python-ci.yml"
pull_request:
paths:
- "crates/echomirror-python/**"
- "crates/echomirror-core/**"
- "crates/echomirror-stellar/**"
- ".github/workflows/python-ci.yml"
jobs:
test:
name: test (${{ matrix.os }}, py${{ matrix.python-version }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Create virtualenv
shell: bash
run: python -m venv .venv
- name: Build and install (develop mode)
working-directory: crates/echomirror-python
shell: bash
run: |
if [ "$RUNNER_OS" = "Windows" ]; then
source ../../.venv/Scripts/activate
else
source ../../.venv/bin/activate
fi
pip install maturin pytest pytest-asyncio
maturin develop --release
- name: Run tests
working-directory: crates/echomirror-python
shell: bash
run: |
if [ "$RUNNER_OS" = "Windows" ]; then
source ../../.venv/Scripts/activate
else
source ../../.venv/bin/activate
fi
pytest -v