Skip to content

feat(spanner): support Private Service Connect (PSC) endpoint overrid… #905

feat(spanner): support Private Service Connect (PSC) endpoint overrid…

feat(spanner): support Private Service Connect (PSC) endpoint overrid… #905

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request_target:
branches:
- main
types: [labeled]
jobs:
check-lint:
name: check-lint
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, 'safe to test') || ${{ github.event_name }} == 'push'

Check warning on line 16 in .github/workflows/ci.yaml

View workflow run for this annotation

GitHub Actions / CI

Workflow syntax warning

.github/workflows/ci.yaml (Line: 16, Col: 9): Conditional expression contains literal text outside replacement tokens. This will cause the expression to always evaluate to truthy. Did you mean to put the entire expression inside ${{ }}?
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{github.event.pull_request.head.repo.full_name}}
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- name: format check
run: ./.github/scripts/fmt.sh
- name: clippy check
run: ./.github/scripts/clippy.sh
check-deps:
name: check-deps
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, 'safe to test') || ${{ github.event_name }} == 'push'

Check warning on line 33 in .github/workflows/ci.yaml

View workflow run for this annotation

GitHub Actions / CI

Workflow syntax warning

.github/workflows/ci.yaml (Line: 33, Col: 9): Conditional expression contains literal text outside replacement tokens. This will cause the expression to always evaluate to truthy. Did you mean to put the entire expression inside ${{ }}?
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{github.event.pull_request.head.repo.full_name}}
- name: cargo-deny
uses: EmbarkStudios/cargo-deny-action@v2
with:
rust-version: "1.88.0"
arguments: --workspace --all-features
foundation:
name: foundation
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, 'safe to test') || ${{ github.event_name }} == 'push'

Check warning on line 47 in .github/workflows/ci.yaml

View workflow run for this annotation

GitHub Actions / CI

Workflow syntax warning

.github/workflows/ci.yaml (Line: 47, Col: 9): Conditional expression contains literal text outside replacement tokens. This will cause the expression to always evaluate to truthy. Did you mean to put the entire expression inside ${{ }}?
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{github.event.pull_request.head.repo.full_name}}
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Setup gcloud
uses: google-github-actions/setup-gcloud@v0.6.0
with:
service_account_key: ${{ secrets.STORAGE_CREDENTIALS }}
export_default_credentials: true
- name: auth-test
run: ./.github/scripts/test-auth.sh
- name: gax-test
run: ./.github/scripts/test-gax.sh
pubsub:
name: pubsub
runs-on: ubuntu-latest
services:
pubsub:
image: messagebird/gcloud-pubsub-emulator:latest
ports:
- 8681:8681
env:
PUBSUB_PROJECT1: "local-project,test-topic:test-subscription,test-topic1:test-subscription1"
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{github.event.pull_request.head.repo.full_name}}
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: test
env:
PUBSUB_EMULATOR_HOST: localhost:8681
RUSTFLAGS: "-A dead_code -A unused"
run: ./.github/scripts/test-pubsub.sh
- name: Setup gcloud
uses: google-github-actions/setup-gcloud@v0.6.0
with:
service_account_key: ${{ secrets.STORAGE_CREDENTIALS }}
export_default_credentials: true
- name: test_in_gcp
env:
RUSTFLAGS: "-A dead_code -A unused"
run: ./.github/scripts/test-pubsub-gcp.sh
spanner:
name: spanner
runs-on: ubuntu-latest
services:
spanner:
image: gcr.io/cloud-spanner-emulator/emulator
ports:
- 9020:9020
- 9010:9010
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{github.event.pull_request.head.repo.full_name}}
- uses: Swatinem/rust-cache@v2
- name: setup spanner
run: |
gcloud config configurations create emulator
gcloud config set auth/disable_credentials true
gcloud config set project local-project
gcloud config set api_endpoint_overrides/spanner http://localhost:9020/
gcloud spanner instances create test-instance --config=emulator-config --description="Test Instance" --nodes=1
- name: migration
uses: docker://mercari/wrench:1.0.4
with:
args: "create --directory spanner/tests/ddl"
env:
SPANNER_PROJECT_ID: local-project
SPANNER_INSTANCE_ID: test-instance
SPANNER_DATABASE_ID: local-database
SPANNER_EMULATOR_HOST: 172.17.0.1:9010
- uses: dtolnay/rust-toolchain@stable
- name: Setup gcloud
uses: google-github-actions/setup-gcloud@v0.6.0
with:
service_account_key: ${{ secrets.STORAGE_CREDENTIALS }}
export_default_credentials: true
- name: test
env:
SPANNER_EMULATOR_HOST: localhost:9010
RUSTFLAGS: "-A dead_code -A unused"
run: ./.github/scripts/test-spanner.sh
- name: test-derive
env:
SPANNER_EMULATOR_HOST: localhost:9010
RUSTFLAGS: "-A dead_code -A unused"
run: ./.github/scripts/test-spanner-derive.sh
storage:
name: storage
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, 'safe to test') || ${{ github.event_name }} == 'push'

Check warning on line 145 in .github/workflows/ci.yaml

View workflow run for this annotation

GitHub Actions / CI

Workflow syntax warning

.github/workflows/ci.yaml (Line: 145, Col: 9): Conditional expression contains literal text outside replacement tokens. This will cause the expression to always evaluate to truthy. Did you mean to put the entire expression inside ${{ }}?
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{github.event.pull_request.head.repo.full_name}}
- name: Setup gcloud
uses: google-github-actions/setup-gcloud@v0.6.0
with:
service_account_key: ${{ secrets.STORAGE_CREDENTIALS }}
export_default_credentials: true
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: test
env:
RUSTFLAGS: "-A dead_code -A unused"
run: ./.github/scripts/test-storage.sh
bigquery:
name: bigquery
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, 'safe to test') || ${{ github.event_name }} == 'push'

Check warning on line 165 in .github/workflows/ci.yaml

View workflow run for this annotation

GitHub Actions / CI

Workflow syntax warning

.github/workflows/ci.yaml (Line: 165, Col: 9): Conditional expression contains literal text outside replacement tokens. This will cause the expression to always evaluate to truthy. Did you mean to put the entire expression inside ${{ }}?
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{github.event.pull_request.head.repo.full_name}}
- name: Setup gcloud
uses: google-github-actions/setup-gcloud@v0.6.0
with:
service_account_key: ${{ secrets.STORAGE_CREDENTIALS }}
export_default_credentials: true
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: test
env:
RUSTFLAGS: "-A dead_code -A unused"
run: ./.github/scripts/test-bigquery.sh
artifact-registry:
name: artifact-registry
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, 'safe to test') || ${{ github.event_name }} == 'push'

Check warning on line 185 in .github/workflows/ci.yaml

View workflow run for this annotation

GitHub Actions / CI

Workflow syntax warning

.github/workflows/ci.yaml (Line: 185, Col: 9): Conditional expression contains literal text outside replacement tokens. This will cause the expression to always evaluate to truthy. Did you mean to put the entire expression inside ${{ }}?
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{github.event.pull_request.head.repo.full_name}}
- name: Setup gcloud
uses: google-github-actions/setup-gcloud@v0.6.0
with:
service_account_key: ${{ secrets.STORAGE_CREDENTIALS }}
export_default_credentials: true
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: test
env:
RUSTFLAGS: "-A dead_code -A unused"
run: ./.github/scripts/test-artifact-registry.sh
kms:
name: kms
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, 'safe to test') || ${{ github.event_name }} == 'push'

Check warning on line 205 in .github/workflows/ci.yaml

View workflow run for this annotation

GitHub Actions / CI

Workflow syntax warning

.github/workflows/ci.yaml (Line: 205, Col: 9): Conditional expression contains literal text outside replacement tokens. This will cause the expression to always evaluate to truthy. Did you mean to put the entire expression inside ${{ }}?
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{github.event.pull_request.head.repo.full_name}}
- name: Setup gcloud
uses: google-github-actions/setup-gcloud@v0.6.0
with:
service_account_key: ${{ secrets.STORAGE_CREDENTIALS }}
export_default_credentials: true
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: test
env:
RUSTFLAGS: "-A dead_code -A unused"
run: ./.github/scripts/test-kms.sh