forked from temporalio/sdk-python
-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (66 loc) · 2.35 KB
/
ci.yml
File metadata and controls
69 lines (66 loc) · 2.35 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
name: Continuous Integration
on:
pull_request:
push:
branches:
- main
- "releases/*"
jobs:
# Build and test the project
build-lint-test:
strategy:
fail-fast: true
matrix:
python: ["3.7", "3.11"]
os: [ubuntu-latest, macos-latest, windows-latest, ubuntu-arm]
include:
- os: ubuntu-latest
python: "3.11"
docsTarget: true
protoCheckTarget: true
- os: ubuntu-arm
runsOn: buildjet-4vcpu-ubuntu-2204-arm
runs-on: ${{ matrix.runsOn || matrix.os }}
steps:
- name: Print build information
run: "echo head_ref: ${{ github.head_ref }}, ref: ${{ github.ref }}, os: ${{ matrix.os }}, python: ${{ matrix.python }}"
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: Swatinem/rust-cache@v1
with:
working-directory: temporalio/bridge
# actions/setup-python doesn't yet support ARM
- if: ${{ !endsWith(matrix.os, '-arm') }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- if: ${{ matrix.os == 'ubuntu-arm' }}
uses: deadsnakes/action@v2.1.1
with:
python-version: ${{ matrix.python }}
- run: python -m pip install --upgrade wheel poetry poethepoet
- run: poetry install --no-root -E opentelemetry
- run: poe lint
- run: poe build-develop
- run: poe test -s -o log_cli_level=DEBUG
# Time skipping doesn't yet support ARM
- if: ${{ !endsWith(matrix.os, '-arm') }}
run: poe test -s -o log_cli_level=DEBUG --workflow-environment time-skipping
# Confirm protos are already generated properly
- name: Check generated protos
if: ${{ matrix.protoCheckTarget }}
run: |
poe gen-protos
poe format
[[ -z $(git status --porcelain) ]] || (git diff; echo "Protos changed"; exit 1)
# Do docs stuff (only on one host)
- name: Build API docs
if: ${{ matrix.docsTarget }}
run: poe gen-docs
- name: Deploy prod API docs
if: ${{ github.ref == 'refs/heads/main' && matrix.docsTarget }}
run: npx vercel deploy build/apidocs -t ${{ secrets.VERCEL_TOKEN }} --name python --scope temporal --prod --yes