Add streaming support for reading rows from Bigtable #259
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: bigtable_rs CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
permissions: | |
contents: read | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ ubuntu-latest, macOS-latest ] # todo: support windows-latest after knowing how to solve openssl issues | |
steps: | |
# cache cargo build | |
- name: Cache cargo registry | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cargo/registry | |
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} | |
- name: Cache cargo index | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cargo/git | |
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} | |
- name: Cache cargo binaries | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cargo/bin | |
key: ${{ runner.os }}-cargo-bin-${{ hashFiles('**/Cargo.lock') }} | |
- name: Cache cargo build | |
uses: actions/cache@v3 | |
with: | |
path: target | |
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} | |
# rust build | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
components: 'rustfmt, llvm-tools-preview' | |
- name: Checkout repository | |
uses: actions/checkout@master | |
with: | |
submodules: 'true' | |
- name: Install Protoc | |
uses: arduino/setup-protoc@v3 | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Check fmt | |
run: cargo fmt -- --check | |
- name: Cargo build | |
run: cargo build | |
env: | |
BUILD_BIGTABLE_RS_GOOGLE_PROTO: 'true' | |
- name: Check git status clean | |
uses: CatChen/check-git-status-action@v1 | |
with: | |
fail-if-not-clean: true # optional | |
push-if-not-clean: false # optional | |
request-changes-if-not-clean: false # optional | |
- name: Run tests | |
run: cargo test --verbose | |
env: | |
CARGO_INCREMENTAL: '0' | |
RUSTFLAGS: '-Cinstrument-coverage' | |
RUSTDOCFLAGS: '-Cinstrument-coverage' | |
- name: Install grcov | |
run: if [[ ! -e ~/.cargo/bin/grcov ]]; then cargo install grcov; fi | |
- name: Run grcov | |
run: grcov . --binary-path target/debug/deps/ -s . -t lcov --branch --ignore-not-existing --ignore '../**' --ignore '/*' --ignore 'bigtable_rs/src/google/*' --keep-only 'bigtable_rs/src/*' -o coverage.lcov | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
files: ./coverage.lcov | |
flags: rust | |
fail_ci_if_error: false # optional (default = false) |