-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add GCF buildpack integration test Workflow
See [functions-framework-conformance builidpack integration workflow PR](GoogleCloudPlatform/functions-framework-conformance#99) for more information. Also, move the script for running conformance tests locally to the conformance test directory.
- Loading branch information
Showing
4 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Validates Functions Framework with GCF buildpacks. | ||
name: Buildpack Integration Test | ||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
jobs: | ||
php74-buildpack-test: | ||
uses: GoogleCloudPlatform/functions-framework-conformance/.github/workflows/[email protected] | ||
with: | ||
http-builder-source: 'tests/conformance' | ||
http-builder-target: 'declarativeHttpFunc' | ||
cloudevent-builder-source: 'tests/conformance' | ||
cloudevent-builder-target: 'declarativeCloudEvent' | ||
prerun: 'tests/conformance/prerun.sh ${{ github.sha }}' | ||
builder-runtime: 'php74' | ||
# Latest uploaded tag from us.gcr.io/fn-img/buildpacks/php74/builder | ||
builder-tag: 'php74_20220620_7_4_29_RC00' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"id":"aaaaaa-1111-bbbb-2222-cccccccccccc","source":"\/\/storage.googleapis.com\/projects\/_\/buckets\/some-bucket","specversion":"1.0","type":"google.cloud.storage.object.v1.finalized","datacontenttype":"application\/json","dataschema":null,"subject":"objects\/folder\/Test.cs","time":"2020-09-29T11:32:00.123Z","data":{"bucket":"some-bucket","contentType":"text\/plain","crc32c":"rTVTeQ==","etag":"CNHZkbuF\/ugCEAE=","generation":"1587627537231057","id":"some-bucket\/folder\/Test.cs\/1587627537231057","kind":"storage#object","md5Hash":"kF8MuJ5+CTJxvyhHS1xzRg==","mediaLink":"https:\/\/www.googleapis.com\/download\/storage\/v1\/b\/some-bucket\/o\/folder%2FTest.cs?generation=1587627537231057&alt=media","metageneration":"1","name":"folder\/Test.cs","selfLink":"https:\/\/www.googleapis.com\/storage\/v1\/b\/some-bucket\/o\/folder\/Test.cs","size":"352","storageClass":"MULTI_REGIONAL","timeCreated":"2020-04-23T07:38:57.230Z","timeStorageClassUpdated":"2020-04-23T07:38:57.230Z","updated":"2020-04-23T07:38:57.230Z"}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# prerun.sh sets up the test function to use the functions framework commit | ||
# specified by generating a `composer.json`. This makes the function `pack` buildable | ||
# with GCF buildpacks. | ||
# | ||
# `pack` build example command: | ||
# pack build myfn --builder us.gcr.io/fn-img/buildpacks/php74/builder:php74_20220620_7_4_29_RC00 --env GOOGLE_RUNTIME=php74 --env GOOGLE_FUNCTION_TARGET=declarativeHttpFunc --env X_GOOGLE_TARGET_PLATFORM=gcf | ||
FRAMEWORK_VERSION=$1 | ||
|
||
# exit when any command fails | ||
set -e | ||
|
||
cd $(dirname $0) | ||
|
||
if [ -z "${FRAMEWORK_VERSION}" ] | ||
then | ||
echo "Functions Framework version required as first parameter" | ||
exit 1 | ||
fi | ||
|
||
echo '{ | ||
"require": { | ||
"google/cloud-functions-framework": "dev-main#'${FRAMEWORK_VERSION}'", | ||
"cloudevents/sdk-php": "^1.0" | ||
} | ||
}' > composer.json | ||
|
||
cat composer.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters