Skip to content

Commit 34897df

Browse files
committed
Add conformance test coverage
1 parent 9423f87 commit 34897df

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

.github/workflows/conformance.yml

+13-3
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ jobs:
3434
run: npm install
3535

3636
- name: Install conformance client
37-
uses: GoogleCloudPlatform/functions-framework-conformance/.github/actions/client/install@1975792fb34ebbfa058d690666186d669d3a5977 # v1.8.0
37+
uses: GoogleCloudPlatform/functions-framework-conformance/.github/actions/client/install@5f2a796b58f099d749e70ecc83f531f6701c64af # v1.8.3
3838
with:
39-
client-version: v1.7.0
39+
client-version: v1.8.2
4040
cache-path: ~/client
41-
cache-key: conformance-client-v1.7.0
41+
cache-key: conformance-client-v1.8.2
4242

4343
- name: Run HTTP conformance tests using legacy API
4444
working-directory: 'test/conformance'
@@ -73,6 +73,16 @@ jobs:
7373
-validate-mapping=false \
7474
-cmd="npm start -- --target=writeHttpDeclarative"
7575
76+
- name: Run Typed conformance tests using declarative API
77+
working-directory: 'test/conformance'
78+
run: |
79+
~/client \
80+
-type=http \
81+
-declarative-type=typed \
82+
-buildpacks=false \
83+
-validate-mapping=false \
84+
-cmd="npm start -- --target=writeTypedDeclarative"
85+
7686
- name: Run cloudevent conformance tests using declarative API
7787
working-directory: 'test/conformance'
7888
run: |

test/conformance/function.js

+6
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ functions.http('writeHttpDeclarative', (req, res) => {
88
res.sendStatus(200);
99
});
1010

11+
functions.typed('writeTypedDeclarative', req => {
12+
return {
13+
payload: req,
14+
};
15+
});
16+
1117
functions.cloudEvent('writeCloudEventDeclarative', cloudEvent => {
1218
cloudEvent.datacontenttype = 'application/json';
1319
writeJson(cloudEvent);

0 commit comments

Comments
 (0)