Repository navigation
67 lines (57 loc) · 1.89 KB
/
Copy pathpython-sdk.yml
File metadata and controls
67 lines (57 loc) · 1.89 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
name: Python SDK
# PR-time compile + test coverage for the Rust-backed `auths` wheel. The wheel
# path-depends on the workspace crates but lives in its own Cargo workspace, so
# main-workspace CI does not compile it — this gate is what catches crate API
# changes breaking the Python glue before a release tag does.
on:
push:
branches: [main]
paths:
- 'packages/auths-python/**'
- 'crates/**'
pull_request:
branches: [main]
paths:
- 'packages/auths-python/**'
- 'crates/**'
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
jobs:
build-and-test:
name: Build wheel & pytest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# cache: false — this build's target dir is packages/auths-python/target, not
# the workspace target, so keep the package-scoped cache below and take only
# the toolchain + shared sccache from the composite.
- uses: ./.github/actions/setup-rust
with:
toolchain: stable
cache: "false"
- uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
packages/auths-python/target
key: ${{ runner.os }}-python-sdk-${{ hashFiles('packages/auths-python/Cargo.lock') }}
restore-keys: ${{ runner.os }}-python-sdk-
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Build and install the wheel
run: |
python -m pip install --upgrade pip
pip install packages/auths-python
- name: Run the Python SDK tests
run: |
pip install pytest
git config --global user.name "CI"
git config --global user.email "ci@auths.dev"
pytest packages/auths-python/tests -x -q
env:
AUTHS_KEYCHAIN_BACKEND: file
AUTHS_PASSPHRASE: 'Ci-ephemeral-pass1!'