Skip to content

remove auth

remove auth #394

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request_target:
branches:
- main
types: [labeled]
jobs:
common:
name: common
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, 'safe to test') || ${{ github.event_name }} == 'push'
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{github.event.pull_request.head.repo.full_name}}
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt, clippy
- uses: actions-rs/cargo@v1
name: format check
with:
command: fmt
args: --all -- --check
- uses: actions-rs/cargo@v1
name: clippy check
with:
command: clippy
args: -- -D warnings
- name: Setup gcloud
uses: google-github-actions/setup-gcloud@v0.6.0
with:
service_account_key: ${{ secrets.STORAGE_CREDENTIALS }}
export_default_credentials: true
- uses: actions-rs/cargo@v1
name: auth-test
with:
command: test
args: --release --all-features --manifest-path foundation/auth/Cargo.toml
- uses: actions-rs/cargo@v1
name: gax-test
with:
command: test
args: --release --all-features --manifest-path foundation/gax/Cargo.toml
- uses: actions-rs/cargo@v1
name: default-test
with:
command: test
args: --release --all-features --manifest-path default/Cargo.toml
- name: cargo-deny
uses: EmbarkStudios/cargo-deny-action@v1
with:
arguments: --workspace --all-features
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: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: actions-rs/cargo@v1
name: test
with:
command: test
args: --release --all-features --manifest-path pubsub/Cargo.toml
env:
PUBSUB_EMULATOR_HOST: localhost:8681
RUSTFLAGS: "-A dead_code -A unused"
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: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- 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: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: actions-rs/cargo@v1
name: test
with:
command: test
args: --release --all-features --manifest-path spanner/Cargo.toml
env:
SPANNER_EMULATOR_HOST: localhost:9010
RUSTFLAGS: "-A dead_code -A unused"
- uses: actions-rs/cargo@v1
name: test-derive
with:
command: test
args: --release --all-features --manifest-path spanner-derive/Cargo.toml
env:
SPANNER_EMULATOR_HOST: localhost:9010
RUSTFLAGS: "-A dead_code -A unused"
storage:
name: storage
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, 'safe to test') || ${{ github.event_name }} == 'push'
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: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: actions-rs/cargo@v1
name: test
with:
command: test
args: --release --all-features --manifest-path storage/Cargo.toml
env:
RUSTFLAGS: "-A dead_code -A unused"