-
Notifications
You must be signed in to change notification settings - Fork 161
113 lines (99 loc) · 3.6 KB
/
conformance.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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
name: Node.js Conformance CI
on:
push:
branches:
- main
pull_request:
# Declare default permissions as read only.
permissions: read-all
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10, 12, 14, 16, 18, 20]
steps:
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
api.github.com:443
github.com:443
objects.githubusercontent.com:443
proxy.golang.org:443
registry.npmjs.org:443
storage.googleapis.com:443
sum.golang.org:443
- name: Checkout code
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: ${{ matrix.node-version }}
- name: Build Functions Framework
run: npm ci
- name: Build test project
working-directory: ./test/conformance
run: npm install
- name: Install conformance client
uses: GoogleCloudPlatform/functions-framework-conformance/.github/actions/client/install@72a4f36b10f1c6435ab1a86a9ea24bda464cc262 # v1.8.6
with:
client-version: v1.8.3
cache-path: ~/client
cache-key: conformance-client-v1.8.3
- name: Run HTTP conformance tests using legacy API
working-directory: 'test/conformance'
run: |
~/client \
-type=http \
-buildpacks=false \
-cmd="npm start -- --target=writeHttp --signature-type=http"
- name: Run event conformance tests using legacy API
working-directory: 'test/conformance'
run: |
~/client \
-type=legacyevent \
-buildpacks=false \
-cmd="npm start -- --target=writeLegacyEvent --signature-type=event"
- name: Run cloudevent conformance tests using legacy API
working-directory: 'test/conformance'
run: |
~/client \
-type=cloudevent \
-buildpacks=false \
-cmd="npm start -- --target=writeCloudEvent --signature-type=cloudevent"
- name: Run HTTP conformance tests using declarative API
working-directory: 'test/conformance'
run: |
~/client \
-type=http \
-buildpacks=false \
-validate-mapping=false \
-cmd="npm start -- --target=writeHttpDeclarative"
- name: Run Typed conformance tests using declarative API
working-directory: 'test/conformance'
run: |
~/client \
-type=http \
-declarative-type=typed \
-buildpacks=false \
-validate-mapping=false \
-cmd="npm start -- --target=writeTypedDeclarative"
- name: Run cloudevent conformance tests using declarative API
working-directory: 'test/conformance'
run: |
~/client \
-type=cloudevent \
-buildpacks=false \
-validate-mapping=true \
-cmd="npm start -- --target=writeCloudEventDeclarative"
- name: Run HTTP concurrency test
working-directory: 'test/conformance'
run: |
~/client \
-type=http \
-buildpacks=false \
-validate-concurrency=true \
-cmd="npm start -- --target=concurrentHttp"