Skip to content

Implement Mongo storage (#1261) #40

Implement Mongo storage (#1261)

Implement Mongo storage (#1261) #40

Workflow file for this run

name: Coverage
on:
push:
branches: [main, release-*]
paths-ignore:
- "docs/**"
pull_request:
branches: [main, release-*]
paths-ignore:
- "docs/**"
env:
CARGO_TERM_COLOR: always
jobs:
coverage:
runs-on: self-hosted
steps:
- uses: actions/checkout@v3
- name: Read rust-toolchain file
id: rust-toolchain
run: echo "toolchain=$(cat rust-toolchain)" >> $GITHUB_OUTPUT
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ steps.rust-toolchain.outputs.toolchain }}
- run: rustup component add llvm-tools-preview
- name: Install grcov
uses: actions-rs/install@v0.1
with:
crate: grcov
version: latest
use-tool-cache: true
- name: clean
run: |
cargo clean
rm -rf ./target/debug/deps/gluesql*
rm *.profraw && rm **/*.profraw
cd storages/csv-storage && rm -rf ./tmp && cd ../..
cd storages/json-storage && rm -rf ./tmp && cd ../..
redis-cli flushall
- name: build
env:
RUSTFLAGS: -Cinstrument-coverage
run: cargo build --verbose
- name: test
env:
RUSTFLAGS: -Cinstrument-coverage
LLVM_PROFILE_FILE: gluesql-%p-%m.profraw
run: cargo test --all-features --verbose
- name: Run grcov
run: |
mkdir coverage
grcov . \
--binary-path ./target/debug/ \
-s . \
-t lcov \
--branch \
--ignore-not-existing \
--ignore "/*" \
--ignore "pkg/rust/examples/*.rs" \
--ignore "cli/src/{cli,helper,lib,main}.rs" \
--excl-line "(#\\[derive\\()|(^\s*.await[;,]?$)|(^test_case\!\([\d\w]+,)" \
-o ./coverage/lcov.info
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}