forked from dapr/python-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (80 loc) · 2.27 KB
/
Copy pathbuild.yaml
File metadata and controls
83 lines (80 loc) · 2.27 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
name: dapr-python
on:
push:
branches:
- feature/*
pull_request:
branches:
- main
- release-*
- feature/*
workflow_dispatch:
merge_group:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Python 3.10
uses: actions/setup-python@v6
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel tox
- name: Run Autoformatter
run: |
tox -e ruff
statusResult=$(git status -u --porcelain)
if [ -z "$statusResult" ]
then
exit 0
else
echo "Source files are not formatted correctly. Run 'tox -e ruff' to autoformat."
exit 1
fi
build:
needs: lint
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python_ver: ["3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python_ver }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python_ver }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel tox
- name: Check Typing
run: |
tox -e type
- name: Run unit-tests
run: |
tox -e py`echo "${{ matrix.python_ver }}" | sed 's/\.//g'`
- name: Upload test coverage
uses: codecov/codecov-action@v5
# Sidecar for running e2e tests requires Go SDK
- name: Install Go SDK for DurableTask Python checks
uses: actions/setup-go@v5
with:
go-version: 'stable'
# Install and run the durabletask-go sidecar for running e2e tests
- name: Pytest e2e tests for DurableTask Python
run: |
# TODO: use dapr run instead of durabletask-go as it provides a more reliable sidecar behavior for e2e tests
go install github.com/dapr/durabletask-go@main
durabletask-go --port 4001 &
pip install -e durabletask[dev]
pytest -m e2e durabletask_tests/
- name: Run examples
run: |
pip install mechanical-markdown
cd durabletask_examples
durabletask-go --port 4001 &
mm.py README.md