-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (49 loc) · 1.8 KB
/
Copy pathtest-python.yml
File metadata and controls
59 lines (49 loc) · 1.8 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
# Generated by scitrera-repo-tools `generate-ci-gha`. Do not edit by hand;
# re-run the generator after editing versions.yaml. Run
# `generate-ci-gha` (no flags) to check for drift, `generate-ci-gha --force` to apply.
name: Test (Python)
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_call:
concurrency:
# github.ref is stable across pushes to the same PR (refs/pull/N/merge), so
# this still cancels a superseded run when you push again — the case where
# cancelling is the right outcome. It deliberately does NOT collapse the
# push and pull_request runs of one commit: that duplicate is avoided with
# ci.push_branches instead, because a cancelled run reports as cancelled
# rather than as success.
group: test-python-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
test-blobgw-client:
name: Test blobgw-client (py${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v7
- uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/[email protected]
- name: Select Go for real gateway tests
run: |
version="$(awk '$1 == "go" { print $2; exit }' ../../go.work)"
go_root="$(GOTOOLCHAIN="go$version" go env GOROOT)"
echo "$go_root/bin" >> "$GITHUB_PATH"
"$go_root/bin/go" version
working-directory: clients/python
- name: Install
run: pip install -e ".[test]"
working-directory: clients/python
- name: Run tests
run: python -m pytest -v
working-directory: clients/python