-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcontinuous-integration-workflow.yml
More file actions
95 lines (80 loc) · 2.88 KB
/
continuous-integration-workflow.yml
File metadata and controls
95 lines (80 loc) · 2.88 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: Test and Deploy
on:
push:
pull_request:
workflow_dispatch:
release:
types:
- created
jobs:
test:
strategy:
fail-fast: false
matrix:
# https://endoflife.date/python
platform:
[
{ os: "ubuntu-latest", python-version: "3.9" },
{ os: "ubuntu-latest", python-version: "3.10" },
{ os: "ubuntu-latest", python-version: "3.11" },
{ os: "ubuntu-latest", python-version: "3.12" },
{ os: "ubuntu-latest", python-version: "3.13" },
{ os: "macos-latest", python-version: "3.9" },
{ os: "macos-latest", python-version: "3.10" },
{ os: "macos-latest", python-version: "3.11" },
{ os: "macos-latest", python-version: "3.12" },
{ os: "macos-latest", python-version: "3.13" },
{ os: "windows-latest", python-version: "3.9" },
{ os: "windows-latest", python-version: "3.10" },
{ os: "windows-latest", python-version: "3.11" },
{ os: "windows-latest", python-version: "3.12" },
{ os: "windows-latest", python-version: "3.13" },
]
runs-on: ${{ matrix.platform.os }}
steps:
- uses: actions/checkout@v3
- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
- name: Install the project
run: uv sync --all-extras --dev
- name: Run tests
run: uv run pytest tests
- name: Install self
run: uv pip install -e .
- name: Generate bindings
run: uv run stellar-contract-bindings python --contract-id CDOAW6D7NXAPOCO7TFAWZNJHK62E3IYRGNRVX3VOXNKNVOXCLLPJXQCF --rpc-url https://mainnet.sorobanrpc.com --output ./bindings
web:
needs: [test]
if: github.event_name == 'release' && github.event.action == 'created' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy web_interface
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
deploy:
needs: [test]
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'created'
permissions:
id-token: write
steps:
- uses: actions/checkout@v3
- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Set up Python 3.13
run: uv python install 3.13
- name: Build the project
run: uv build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
complete:
if: always()
needs: [test, web, deploy]
runs-on: ubuntu-latest
steps:
- if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
run: exit 1