1
+ name : Python Conformance CI (asgi)
2
+ on :
3
+ push :
4
+ branches :
5
+ - ' main'
6
+ pull_request :
7
+
8
+ # Declare default permissions as read only.
9
+ permissions : read-all
10
+
11
+ jobs :
12
+ build :
13
+ strategy :
14
+ matrix :
15
+ python : ['3.8', '3.9', '3.10', '3.11', '3.12']
16
+ platform : [ubuntu-latest]
17
+ runs-on : ${{ matrix.platform }}
18
+ steps :
19
+ - name : Harden Runner
20
+ uses : step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
21
+ with :
22
+ disable-sudo : true
23
+ egress-policy : block
24
+ allowed-endpoints : >
25
+ api.github.com:443
26
+ files.pythonhosted.org:443
27
+ github.com:443
28
+ objects.githubusercontent.com:443
29
+ proxy.golang.org:443
30
+ pypi.org:443
31
+ storage.googleapis.com:443
32
+
33
+ - name : Checkout code
34
+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
35
+
36
+ - name : Setup Python
37
+ uses : actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
38
+ with :
39
+ python-version : ${{ matrix.python }}
40
+
41
+ - name : Install the framework with async extras
42
+ run : python -m pip install -e .[async]
43
+
44
+ - name : Setup Go
45
+ uses : actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
46
+ with :
47
+ go-version : ' 1.24'
48
+
49
+ - name : Run HTTP conformance tests
50
+ uses : GoogleCloudPlatform/functions-framework-conformance/action@72a4f36b10f1c6435ab1a86a9ea24bda464cc262 # v1.8.6
51
+ with :
52
+ functionType : ' http'
53
+ useBuildpacks : false
54
+ validateMapping : false
55
+ cmd : " 'functions-framework --source tests/conformance/main.py --target write_http --signature-type http --gateway asgi'"
56
+
57
+ - name : Run CloudEvents conformance tests
58
+ uses : GoogleCloudPlatform/functions-framework-conformance/action@72a4f36b10f1c6435ab1a86a9ea24bda464cc262 # v1.8.6
59
+ with :
60
+ functionType : ' cloudevent'
61
+ useBuildpacks : false
62
+ validateMapping : true
63
+ cmd : " 'functions-framework --source tests/conformance/main.py --target write_cloud_event --signature-type cloudevent --gateway asgi'"
64
+
65
+ - name : Run HTTP conformance tests declarative
66
+ uses : GoogleCloudPlatform/functions-framework-conformance/action@72a4f36b10f1c6435ab1a86a9ea24bda464cc262 # v1.8.6
67
+ with :
68
+ functionType : ' http'
69
+ useBuildpacks : false
70
+ validateMapping : false
71
+ cmd : " 'functions-framework --source tests/conformance/main.py --target write_http_declarative --gateway asgi'"
72
+
73
+ - name : Run CloudEvents conformance tests declarative
74
+ uses : GoogleCloudPlatform/functions-framework-conformance/action@72a4f36b10f1c6435ab1a86a9ea24bda464cc262 # v1.8.6
75
+ with :
76
+ functionType : ' cloudevent'
77
+ useBuildpacks : false
78
+ validateMapping : true
79
+ cmd : " 'functions-framework --source tests/conformance/main.py --target write_cloud_event_declarative --gateway asgi'"
80
+
81
+ - name : Run HTTP concurrency tests declarative
82
+ uses : GoogleCloudPlatform/functions-framework-conformance/action@72a4f36b10f1c6435ab1a86a9ea24bda464cc262 # v1.8.6
83
+ with :
84
+ functionType : ' http'
85
+ useBuildpacks : false
86
+ validateConcurrency : true
87
+ cmd : " 'functions-framework --source tests/conformance/main.py --target write_http_declarative_concurrent --gateway asgi'"
88
+
89
+ # Note: Event (legacy) and Typed tests are not supported in ASGI mode
0 commit comments