-
Notifications
You must be signed in to change notification settings - Fork 43
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.
- Loading branch information
Showing
3 changed files
with
51 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: | ||
ruby30-buildpack-test: | ||
uses: GoogleCloudPlatform/functions-framework-conformance/.github/workflows/[email protected] | ||
with: | ||
http-builder-source: 'test/conformance' | ||
http-builder-target: 'http_func' | ||
cloudevent-builder-source: 'test/conformance' | ||
cloudevent-builder-target: 'cloudevent_func' | ||
prerun: 'test/conformance/prerun.sh ${{ github.sha }}' | ||
builder-runtime: 'ruby30' | ||
# Latest uploaded tag from us.gcr.io/fn-img/buildpacks/ruby30/builder | ||
builder-tag: 'ruby30_20220620_3_0_4_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,5 @@ | ||
# These files are generate dynamically based off the git commit sha | ||
# when trying to build the conformance test function with buildpacks, | ||
# and should not be checked in. | ||
Gemfile | ||
Gemfile.lock |
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. This makes the function `pack` buildable with GCF buildpacks. | ||
# | ||
# `pack` build example command: | ||
# pack build myfn --verbose --builder us.gcr.io/fn-img/buildpacks/ruby30/builder:ruby30_20220620_3_0_4_RC00 --env GOOGLE_RUNTIME=ruby30 --env GOOGLE_FUNCTION_TARGET=http_func --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 "source 'https://rubygems.org' | ||
gem 'functions_framework', github: 'GoogleCloudPlatform/functions-framework-ruby', ref: '$FRAMEWORK_VERSION'" > Gemfile | ||
cat Gemfile | ||
|
||
sudo gem install bundler | ||
|
||
# Generate a Gemfile.lock without installing any Gems | ||
bundle lock --update | ||
cat Gemfile.lock |