Skip to content

Commit 03bc032

Browse files
author
Kenneth Rosario
authored
chore: run buildpack tests on pull request (#218)
1 parent 04f0459 commit 03bc032

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

.github/workflows/buildpack-integration-test.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ on:
44
push:
55
branches:
66
- main
7+
pull_request:
78
workflow_dispatch:
9+
# Runs every day on 12:00 AM PST
10+
schedule:
11+
- cron: "0 0 * * *"
812

913
# Declare default permissions as read only.
1014
permissions: read-all
@@ -19,6 +23,8 @@ jobs:
1923
cloudevent-builder-target: 'com.google.cloud.functions.conformance.CloudEventsConformanceFunction'
2024
prerun: 'invoker/conformance/prerun.sh'
2125
builder-runtime: 'java11'
26+
builder-runtime-version: '11'
27+
builder-url: gcr.io/gae-runtimes/buildpacks/google-gae-22/java/builder:latest
2228
java17-buildpack-test:
2329
uses: GoogleCloudPlatform/functions-framework-conformance/.github/workflows/buildpack-integration-test.yml@main
2430
with:
@@ -27,4 +33,6 @@ jobs:
2733
cloudevent-builder-source: '/tmp/tests/conformance'
2834
cloudevent-builder-target: 'com.google.cloud.functions.conformance.CloudEventsConformanceFunction'
2935
prerun: 'invoker/conformance/prerun.sh'
30-
builder-runtime: 'java17'
36+
builder-runtime: 'java17'
37+
builder-runtime-version: '17'
38+
builder-url: gcr.io/gae-runtimes/buildpacks/google-gae-22/java/builder:latest

invoker/conformance/prerun.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@
1414
# - Copy the conformance tests folder into temp
1515
# - Build java-function-invoker with version 0.0.0-SNAPSHOT into artifacts
1616
# folder
17-
# - Build functions-framework-api with version 0.0.0-SNAPSHOT into artifacts
17+
# - Build functions-framework-api with version 0.0.0-SNAPSHOT into artifacts
1818
# folder
1919
# - Ensure that we use the buildpack_pom.xml file by renaming it to pom.xml
2020

21-
2221
set -e
2322
REPO_ROOT=$(git rev-parse --show-toplevel)
2423

@@ -36,7 +35,7 @@ function get_mvn_version() {
3635
}
3736

3837
# Must first install a local version of the API package
39-
cd $REPO_ROOT/functions-framework-api
38+
cd $REPO_ROOT/functions-framework-api
4039
mvn install -Dmaven.repo.local=/tmp/tests/conformance/artifacts
4140
FRAMEWORK_API_VERSION=$(get_mvn_version)
4241

@@ -50,3 +49,5 @@ mv /tmp/tests/conformance/buildpack_pom.xml /tmp/tests/conformance/pom.xml
5049

5150
sed -i "s/FRAMEWORK-API-VERSION/${FRAMEWORK_API_VERSION}/g" /tmp/tests/conformance/pom.xml
5251
sed -i "s/INVOKER-VERSION/${INVOKER_VERSION}/g" /tmp/tests/conformance/pom.xml
52+
53+
cat /tmp/tests/conformance/pom.xml

0 commit comments

Comments
 (0)