Skip to content

Commit

Permalink
fix: run conformance tests against the current FF version (#236)
Browse files Browse the repository at this point in the history
* run conformance tests against the current FF version specified by  $GITHUB_SHA instead of the default version in buildpacks
* update conformance action version
* remove no longer used script
* remove nodejs14 since this runtime is not yet live and does not have tag :latest.

fixes #231
  • Loading branch information
hdp617 committed Nov 11, 2020
1 parent 2449956 commit 240defc
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 48 deletions.
16 changes: 6 additions & 10 deletions .github/workflows/conformance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,44 +9,40 @@ jobs:
runs-on: ubuntu-18.04
strategy:
matrix:
runtime: ['nodejs10', 'nodejs12', 'nodejs14']
runtime: ['nodejs10', 'nodejs12']
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: '1.13'
- name: Setup test data
run: "./test/conformance/set_up_conformance_tests.sh"
- name: Run HTTP conformance tests
uses: GoogleCloudPlatform/functions-framework-conformance/action@v0.3.1
uses: GoogleCloudPlatform/functions-framework-conformance/action@v0.3.5
with:
functionType: 'http'
validateMapping: false
source: 'test/conformance'
target: 'writeHttp'
runtime: ${{ matrix.runtime }}
# TODO: Remove when tag :latest is enabled.
tag: '${{ matrix.runtime }}_20201005_20_RC00'
startDelay: 10
- name: Run event conformance tests
uses: GoogleCloudPlatform/functions-framework-conformance/action@v0.3.1
uses: GoogleCloudPlatform/functions-framework-conformance/action@v0.3.5
with:
functionType: 'legacyevent'
validateMapping: false
source: 'test/conformance'
target: 'writeLegacyEvent'
runtime: ${{ matrix.runtime }}
# TODO: Remove when tag :latest is enabled.
tag: '${{ matrix.runtime }}_20201005_20_RC00'
startDelay: 10
- name: Run cloudevent conformance tests
uses: GoogleCloudPlatform/functions-framework-conformance/action@v0.3.1
uses: GoogleCloudPlatform/functions-framework-conformance/action@v0.3.5
with:
functionType: 'cloudevent'
validateMapping: false
source: 'test/conformance'
target: 'writeCloudEvent'
runtime: ${{ matrix.runtime }}
# TODO: Remove when tag :latest is enabled.
tag: '${{ matrix.runtime }}_20201005_20_RC00'
startDelay: 10
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
},
"scripts": {
"test": "mocha build/test",
"test-conformance": "cd test/conformance && ./run-conformance-tests.sh",
"check": "gts check",
"clean": "gts clean",
"compile": "tsc -p .",
Expand Down
5 changes: 5 additions & 0 deletions test/conformance/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"dependencies": {
"@google-cloud/functions-framework": "github:GoogleCloudPlatform/functions-framework-nodejs"
}
}
37 changes: 0 additions & 37 deletions test/conformance/run-conformance-tests.sh

This file was deleted.

3 changes: 3 additions & 0 deletions test/conformance/set_up_conformance_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

sed -i "s/functions-framework-nodejs/functions-framework-nodejs#$GITHUB_SHA/" package.json

0 comments on commit 240defc

Please sign in to comment.