Skip to content

Wait for bucket to become accessible after creation #339

Wait for bucket to become accessible after creation

Wait for bucket to become accessible after creation #339

name: GCS Integration Tests
on:
workflow_dispatch:
inputs:
pr_ref:
description: 'SHA of the PR head commit (for fork PRs)'
required: false
default: ''
pull_request:
push:
branches:
- "main"
concurrency:
group: gcs-integration
cancel-in-progress: false
jobs:
gcs-integration-fast-tests:
name: GCS Integation Fast Tests
runs-on: ubuntu-latest
# Run on push/workflow_dispatch, skip fork PRs
if: |
github.event_name == 'push' ||
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)
permissions:
statuses: write
steps:
- name: Checkout code
uses: actions/checkout@v7
with:
ref: ${{ inputs.pr_ref || github.sha }}
- name: Set up Go
uses: actions/setup-go@v7
with:
go-version-file: go.mod
- name: Install Ginkgo
run: go install github.com/onsi/ginkgo/v2/ginkgo@latest
- name: Setup GCS Test Environment
run: |
echo "${{ secrets.GCP_SERVICE_ACCOUNT_BASE64 }}" | base64 -d > /tmp/gcp-key.json
export google_json_key_data="$(cat /tmp/gcp-key.json)"
./.github/scripts/gcs/setup.sh
- name: Run Fast Tests
run: |
echo "${{ secrets.GCP_SERVICE_ACCOUNT_BASE64 }}" | base64 -d > /tmp/gcp-key.json
export google_json_key_data="$(cat /tmp/gcp-key.json)"
export SKIP_LONG_TESTS=yes
./.github/scripts/gcs/run-int.sh
- name: Teardown GCS Test Environment
if: always()
run: |
echo "${{ secrets.GCP_SERVICE_ACCOUNT_BASE64 }}" | base64 -d > /tmp/gcp-key.json
export google_json_key_data="$(cat /tmp/gcp-key.json)"
./.github/scripts/gcs/teardown.sh
- name: Report fork PR status
if: always() && inputs.pr_ref != ''
uses: ./.github/actions/report-fork-status
with:
pr_ref: ${{ inputs.pr_ref }}
name: GCS Integation Fast Tests
gcs-integration-all-tests:
name: GCS Integation All Tests
runs-on: ubuntu-latest
# Run on push/workflow_dispatch, skip fork PRs
if: |
github.event_name == 'push' ||
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)
permissions:
statuses: write
steps:
- name: Checkout code
uses: actions/checkout@v7
with:
ref: ${{ inputs.pr_ref || github.sha }}
- name: Set up Go
uses: actions/setup-go@v7
with:
go-version-file: go.mod
- name: Install Ginkgo
run: go install github.com/onsi/ginkgo/v2/ginkgo@latest
- name: Setup GCS Test Environment
run: |
echo "${{ secrets.GCP_SERVICE_ACCOUNT_BASE64 }}" | base64 -d > /tmp/gcp-key.json
export google_json_key_data="$(cat /tmp/gcp-key.json)"
./.github/scripts/gcs/setup.sh
- name: Run All Tests
run: |
echo "${{ secrets.GCP_SERVICE_ACCOUNT_BASE64 }}" | base64 -d > /tmp/gcp-key.json
export google_json_key_data="$(cat /tmp/gcp-key.json)"
./.github/scripts/gcs/run-int.sh
- name: Teardown GCS Test Environment
if: always()
run: |
echo "${{ secrets.GCP_SERVICE_ACCOUNT_BASE64 }}" | base64 -d > /tmp/gcp-key.json
export google_json_key_data="$(cat /tmp/gcp-key.json)"
./.github/scripts/gcs/teardown.sh
- name: Report fork PR status
if: always() && inputs.pr_ref != ''
uses: ./.github/actions/report-fork-status
with:
pr_ref: ${{ inputs.pr_ref }}
name: GCS Integation All Tests