Change variable to string

deannagarcia-patch-10
Deanna Garcia 5 months ago
parent eb33cd2cd4
commit 68bd213ce9
  1. 7
      .github/workflows/test_bazel.yml
  2. 6
      .github/workflows/test_cpp.yml
  3. 11
      .github/workflows/test_java.yml
  4. 12
      .github/workflows/test_runner.yml

@ -3,9 +3,10 @@ name: Bazel Tests
on:
workflow_call:
inputs:
is-presubmit:
description: "True if we are in a presubmit run, false otherwise"
type: boolean
test-type:
required: true
description: "The type of test this is run from -- presubmit or continuous"
type: string
safe-checkout:
required: true
description: "The SHA key for the commit we want to run over"

@ -3,10 +3,10 @@ name: C++ Tests
on:
workflow_call:
inputs:
is-presubmit:
test-type:
required: true
description: "True if we are in a presubmit run, false otherwise"
type: boolean
description: "The type of test this is run from -- presubmit or continuous"
type: string
safe-checkout:
required: true
description: "The SHA key for the commit we want to run over"

@ -3,9 +3,10 @@ name: Java Tests
on:
workflow_call:
inputs:
is-presubmit:
description: "True if we are in a presubmit run, false otherwise"
type: boolean
test-type:
required: true
description: "The type of test this is run from -- presubmit or continuous"
type: string
safe-checkout:
required: true
description: "The SHA key for the commit we want to run over"
@ -26,12 +27,12 @@ jobs:
# TODO: b/318555165 - enable the layering check. Currently it does
# not work correctly with the toolchain in this Docker image.
targets: //java/... //java/internal:java_version --features=-layering_check
if: ${{ !inputs.presubmit }}
if: ${{ inputs.test-type == 'continuous' }}
- name: OpenJDK 11 (Continuous)
version: '11'
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/java:11-1fdbb997433cb22c1e49ef75ad374a8d6bb88702
targets: //java/... //java/internal:java_version
if: ${{ !inputs.presubmit }}
if: ${{ inputs.test-type == 'continuous' }}
- name: OpenJDK 17
version: '17'
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/java:17-1fdbb997433cb22c1e49ef75ad374a8d6bb88702

@ -77,9 +77,9 @@ jobs:
# Store the sha for checkout so we can easily use it later. For safe
# events, this will be blank and use the defaults.
checkout-sha: ${{ steps.safe-checkout.outputs.sha }}
# Stores a boolean value denoting whether this is a presubmit run. This
# helps us determine which tests to block on.
run-as-presubmit: ${{ github.event_name == 'pull_request' || github.event_name == 'pull_request_target' }}
# Stores a string denoting whether this is a presubmit or continuous
# run. This helps us determine which tests to block on.
test-type: ${{ (github.event_name == 'pull_request' || github.event_name == 'pull_request_target') && 'presubmit' || 'continuous' }}
steps:
- name: Check
# Trivially pass for safe PRs, and explicitly error for unsafe ones
@ -117,7 +117,7 @@ jobs:
needs: [check-tag]
uses: ./.github/workflows/test_bazel.yml
with:
is-presubmit: ${{ needs.check-tag.outputs.run-as-presubmit == 'true' }}
test-type: ${{ needs.check-tag.outputs.test-type }}
safe-checkout: ${{ needs.check-tag.outputs.checkout-sha }}
secrets: inherit
@ -126,7 +126,7 @@ jobs:
needs: [check-tag]
uses: ./.github/workflows/test_cpp.yml
with:
is-presubmit: ${{ needs.check-tag.outputs.run-as-presubmit }}
test-type: ${{ needs.check-tag.outputs.test-type }}
safe-checkout: ${{ needs.check-tag.outputs.checkout-sha }}
secrets: inherit
@ -135,7 +135,7 @@ jobs:
needs: [check-tag]
uses: ./.github/workflows/test_java.yml
with:
is-presubmit: ${{ needs.check-tag.outputs.run-as-presubmit }}
test-type: ${{ needs.check-tag.outputs.test-type }}
safe-checkout: ${{ needs.check-tag.outputs.checkout-sha }}
secrets: inherit

Loading…
Cancel
Save