fix: depend on tower util feature #699
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' | |
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: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt, clippy | |
- name: format check | |
run: cargo fmt --all -- --check | |
- name: clippy check | |
run: cargo clippy -- -D warnings | |
check-deps: | |
name: check-deps | |
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: cargo-deny | |
uses: EmbarkStudios/cargo-deny-action@v1 | |
with: | |
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' | |
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: 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: auth-test | |
run: cargo test --release --all-features --manifest-path foundation/auth/Cargo.toml | |
- name: gax-test | |
run: cargo test --release --all-features --manifest-path foundation/gax/Cargo.toml | |
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: dtolnay/rust-toolchain@stable | |
- name: test | |
env: | |
PUBSUB_EMULATOR_HOST: localhost:8681 | |
RUSTFLAGS: "-A dead_code -A unused" | |
run: cargo test --release --all-features --manifest-path pubsub/Cargo.toml | |
- 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: cargo test --release --all-features --manifest-path pubsub/Cargo.toml -- --ignored | |
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: 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: cargo test --release --all-features --manifest-path spanner/Cargo.toml | |
- name: test-derive | |
env: | |
SPANNER_EMULATOR_HOST: localhost:9010 | |
RUSTFLAGS: "-A dead_code -A unused" | |
run: cargo test --release --all-features --manifest-path spanner-derive/Cargo.toml | |
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: dtolnay/rust-toolchain@stable | |
- name: test | |
env: | |
RUSTFLAGS: "-A dead_code -A unused" | |
run: cargo test --release --all-features --manifest-path storage/Cargo.toml | |
bigquery: | |
name: bigquery | |
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: dtolnay/rust-toolchain@stable | |
- name: test | |
env: | |
RUSTFLAGS: "-A dead_code -A unused" | |
run: cargo test --release --all-features --manifest-path bigquery/Cargo.toml | |
artifact-registry: | |
name: artifact-registry | |
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: dtolnay/rust-toolchain@stable | |
- name: test | |
env: | |
RUSTFLAGS: "-A dead_code -A unused" | |
run: cargo test --release --all-features --manifest-path artifact-registry/Cargo.toml | |
kms: | |
name: kms | |
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: dtolnay/rust-toolchain@stable | |
- name: test | |
env: | |
RUSTFLAGS: "-A dead_code -A unused" | |
run: cargo test --release --all-features --manifest-path kms/Cargo.toml |