feat(query): add templatedb storage #63
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
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: | |
- main | |
name: CI | |
env: | |
RUSTFLAGS: -D warnings | |
CARGO_TERM_COLOR: always | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Protoc | |
uses: arduino/setup-protoc@v3 | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: rustfmt, clippy, miri | |
- uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2 | |
- name: Lint (clippy) | |
run: cargo clippy --all-features --all-targets | |
- name: Lint (rustfmt) | |
run: cargo fmt --check | |
build: | |
name: Build and test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
- ubuntu-latest | |
# macos-14 for M1 runners | |
- macos-14 | |
rust-version: [nightly] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust-version }} | |
- uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2 | |
with: | |
# Matrix instances (other than OS) need to be added to this explicitly | |
key: ${{ matrix.rust-version }} | |
- name: Install Protoc | |
uses: arduino/setup-protoc@v3 | |
- name: Install latest nextest release | |
uses: taiki-e/install-action@nextest | |
- name: Build all targets with all features | |
run: cargo build --all-targets --all-features | |
- name: Doctests | |
run: cargo test --doc | |
- name: Test with latest nextest | |
run: cargo nextest run | |
# - name: Test with miri | |
# run: cargo nextest miri run | |
coverage: | |
name: Collect test coverage | |
runs-on: ubuntu-latest | |
# nightly rust might break from time to time | |
continue-on-error: true | |
env: | |
RUSTFLAGS: -D warnings | |
CARGO_TERM_COLOR: always | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
# Nightly Rust is used for cargo llvm-cov --doc below. | |
- name: Install Protoc | |
uses: arduino/setup-protoc@v3 | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: llvm-tools-preview | |
- uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2 | |
- name: Install latest nextest release | |
uses: taiki-e/install-action@nextest | |
- name: Install cargo-llvm-cov | |
uses: taiki-e/install-action@cargo-llvm-cov | |
- name: Collect coverage data | |
# Generate separate reports for nextest and doctests, and combine them. | |
run: | | |
cargo llvm-cov --no-report nextest | |
cargo llvm-cov --no-report --doc | |
cargo llvm-cov report --doctests --lcov --output-path lcov.info | |
- name: Upload coverage data to codecov | |
uses: codecov/codecov-action@v4.0.1 # v4 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
with: | |
files: lcov.info |