forked from getsentry/sentry-python
-
Notifications
You must be signed in to change notification settings - Fork 0
97 lines (81 loc) · 2.11 KB
/
ci.yml
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
96
97
name: CI
on:
push:
branches:
- master
- release/**
- sentry-sdk-2.0
pull_request:
permissions:
contents: read
env:
BUILD_CACHE_KEY: ${{ github.sha }}
CACHED_BUILD_PATHS: |
${{ github.workspace }}/dist-serverless
jobs:
lint:
name: Lint Sources
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4.1.7
- uses: actions/setup-python@v5
with:
python-version: 3.12
- run: |
pip install tox
tox -e linters
check-ci-config:
name: Check CI config
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4.1.7
- uses: actions/setup-python@v5
with:
python-version: 3.12
- run: |
pip install jinja2
python scripts/split-tox-gh-actions/split-tox-gh-actions.py --fail-on-changes
build_lambda_layer:
name: Build Package
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4.1.7
- uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Setup build cache
uses: actions/cache@v4
id: build_cache
with:
path: ${{ env.CACHED_BUILD_PATHS }}
key: ${{ env.BUILD_CACHE_KEY }}
- name: Build Packages
run: |
echo "Creating directory containing Python SDK Lambda Layer"
# This will also trigger "make dist" that creates the Python packages
make aws-lambda-layer
- name: Upload Python Packages
uses: actions/upload-artifact@v3
with:
name: ${{ github.sha }}
path: |
dist/*
docs:
name: Build SDK API Doc
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4.1.7
- uses: actions/setup-python@v5
with:
python-version: 3.12
- run: |
make apidocs
cd docs/_build && zip -r gh-pages ./
- uses: actions/upload-artifact@v3.1.1
with:
name: ${{ github.sha }}
path: docs/_build/gh-pages.zip