forked from GoogleCloudPlatform/functions-framework-python
-
Notifications
You must be signed in to change notification settings - Fork 0
96 lines (83 loc) · 3.76 KB
/
conformance.yml
File metadata and controls
96 lines (83 loc) · 3.76 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
96
name: Python Conformance CI
on: [push, pull_request]
# Declare default permissions as read only.
permissions: read-all
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python: ['3.7', '3.8', '3.9', '3.10', '3.11']
steps:
- name: Harden Runner
uses: step-security/harden-runner@18bf8ad2ca49c14cbb28b91346d626ccfb00c518 # v2.1.0
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
- name: Checkout code
uses: actions/checkout@dc323e67f16fb5f7663d20ff7941f27f5809e9b6 # v2.6.0
- name: Setup Python
uses: actions/setup-python@75f3110429a8c05be0e1bf360334e4cced2b63fa # v2.3.3
with:
python-version: ${{ matrix.python }}
- name: Install the framework
run: python -m pip install -e .
- name: Setup Go
uses: actions/setup-go@bfdd3570ce990073878bf10f6b2d79082de49492 # v2.2.0
with:
go-version: '1.16'
- name: Run HTTP conformance tests
uses: GoogleCloudPlatform/functions-framework-conformance/action@c52662e612b2685a027b1c3e02224306517722fc # v1.6.0
with:
version: 'v1.6.0'
functionType: 'http'
useBuildpacks: false
validateMapping: false
cmd: "'functions-framework --source tests/conformance/main.py --target write_http --signature-type http'"
- name: Run event conformance tests
uses: GoogleCloudPlatform/functions-framework-conformance/action@c52662e612b2685a027b1c3e02224306517722fc # v1.6.0
with:
version: 'v1.6.0'
functionType: 'legacyevent'
useBuildpacks: false
validateMapping: true
cmd: "'functions-framework --source tests/conformance/main.py --target write_legacy_event --signature-type event'"
- name: Run CloudEvents conformance tests
uses: GoogleCloudPlatform/functions-framework-conformance/action@c52662e612b2685a027b1c3e02224306517722fc # v1.6.0
with:
version: 'v1.6.0'
functionType: 'cloudevent'
useBuildpacks: false
validateMapping: true
cmd: "'functions-framework --source tests/conformance/main.py --target write_cloud_event --signature-type cloudevent'"
- name: Run HTTP conformance tests declarative
uses: GoogleCloudPlatform/functions-framework-conformance/action@c52662e612b2685a027b1c3e02224306517722fc # v1.6.0
with:
version: 'v1.6.0'
functionType: 'http'
useBuildpacks: false
validateMapping: false
cmd: "'functions-framework --source tests/conformance/main.py --target write_http_declarative'"
- name: Run CloudEvents conformance tests declarative
uses: GoogleCloudPlatform/functions-framework-conformance/action@c52662e612b2685a027b1c3e02224306517722fc # v1.6.0
with:
version: 'v1.6.0'
functionType: 'cloudevent'
useBuildpacks: false
validateMapping: true
cmd: "'functions-framework --source tests/conformance/main.py --target write_cloud_event_declarative'"
- name: Run HTTP concurrency tests declarative
uses: GoogleCloudPlatform/functions-framework-conformance/action@c52662e612b2685a027b1c3e02224306517722fc # v1.6.0
with:
version: 'v1.6.0'
functionType: 'http'
useBuildpacks: false
validateConcurrency: true
cmd: "'functions-framework --source tests/conformance/main.py --target write_http_declarative_concurrent'"
- name: Run Typed tests declarative
uses: GoogleCloudPlatform/functions-framework-conformance/action@c52662e612b2685a027b1c3e02224306517722fc # v1.6.0
with:
version: 'v1.6.0'
functionType: 'http'
useBuildpacks: false
validateMapping: false
cmd: "'functions-framework --source tests/conformance/main.py --target write_typed_event_declarative'"