-
Notifications
You must be signed in to change notification settings - Fork 119
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 (#185)
See [functions-framework-conformance builidpack integration workflow PR](GoogleCloudPlatform/functions-framework-conformance#99) for more information.
- Loading branch information
Showing
2 changed files
with
73 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,52 @@ | ||
# Validates Functions Framework with GCF buildpacks. | ||
name: Buildpack Integration Test | ||
on: | ||
push: | ||
branches: | ||
- master | ||
workflow_dispatch: | ||
jobs: | ||
python37: | ||
uses: GoogleCloudPlatform/functions-framework-conformance/.github/workflows/[email protected] | ||
with: | ||
http-builder-source: 'tests/conformance' | ||
http-builder-target: 'write_http_declarative' | ||
cloudevent-builder-source: 'tests/conformance' | ||
cloudevent-builder-target: 'write_cloud_event_declarative' | ||
prerun: 'tests/conformance/prerun.sh ${{ github.sha }}' | ||
builder-runtime: 'python37' | ||
# Latest uploaded tag from us.gcr.io/fn-img/buildpacks/python37/builder | ||
builder-tag: 'python37_20220426_3_7_12_RC00' | ||
python38: | ||
uses: GoogleCloudPlatform/functions-framework-conformance/.github/workflows/[email protected] | ||
with: | ||
http-builder-source: 'tests/conformance' | ||
http-builder-target: 'write_http_declarative' | ||
cloudevent-builder-source: 'tests/conformance' | ||
cloudevent-builder-target: 'write_cloud_event_declarative' | ||
prerun: 'tests/conformance/prerun.sh ${{ github.sha }}' | ||
builder-runtime: 'python38' | ||
# Latest uploaded tag from us.gcr.io/fn-img/buildpacks/python38/builder | ||
builder-tag: 'python38_20220426_3_8_12_RC00' | ||
python39: | ||
uses: GoogleCloudPlatform/functions-framework-conformance/.github/workflows/[email protected] | ||
with: | ||
http-builder-source: 'tests/conformance' | ||
http-builder-target: 'write_http_declarative' | ||
cloudevent-builder-source: 'tests/conformance' | ||
cloudevent-builder-target: 'write_cloud_event_declarative' | ||
prerun: 'tests/conformance/prerun.sh ${{ github.sha }}' | ||
builder-runtime: 'python39' | ||
# Latest uploaded tag from us.gcr.io/fn-img/buildpacks/python39/builder | ||
builder-tag: 'python39_20220426_3_9_10_RC00' | ||
python310: | ||
uses: GoogleCloudPlatform/functions-framework-conformance/.github/workflows/[email protected] | ||
with: | ||
http-builder-source: 'tests/conformance' | ||
http-builder-target: 'write_http_declarative' | ||
cloudevent-builder-source: 'tests/conformance' | ||
cloudevent-builder-target: 'write_cloud_event_declarative' | ||
prerun: 'tests/conformance/prerun.sh ${{ github.sha }}' | ||
builder-runtime: 'python310' | ||
# Latest uploaded tag from us.gcr.io/fn-img/buildpacks/python310/builder | ||
builder-tag: 'python310_20220320_3_10_2_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,21 @@ | ||
# prerun.sh sets up the test function to use the functions framework commit | ||
# specified by generating a `requirements.txt`. This makes the function `pack` buildable | ||
# with GCF buildpacks. | ||
# | ||
# `pack` command example: | ||
# pack build python-test --builder us.gcr.io/fn-img/buildpacks/python310/builder:python310_20220320_3_10_2_RC00 --env GOOGLE_RUNTIME=python310 --env GOOGLE_FUNCTION_TARGET=write_http_declarative | ||
set -e | ||
|
||
FRAMEWORK_VERSION=$1 | ||
if [ -z "${FRAMEWORK_VERSION}" ] | ||
then | ||
echo "Functions Framework version required as first parameter" | ||
exit 1 | ||
fi | ||
|
||
SCRIPT_DIR=$(realpath $(dirname $0)) | ||
|
||
cd $SCRIPT_DIR | ||
|
||
echo "git+https://github.com/GoogleCloudPlatform/functions-framework-python@$FRAMEWORK_VERSION#egg=functions-framework" > requirements.txt | ||
cat requirements.txt |