Skip to content

Commit

Permalink
Adding coverage to nucliadb_node_binding (#1173)
Browse files Browse the repository at this point in the history
* reorganized the test in the standard layout [sc-6677]

* make the new action run manually for now

* reactivate lints

* fix the name
  • Loading branch information
tarekziade authored Aug 9, 2023
1 parent c13f6ba commit eb30db7
Show file tree
Hide file tree
Showing 11 changed files with 613 additions and 126 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/nucliadb_node_binding.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: nucliadb Node Binding (rust + python)

on: workflow_dispatch

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true

env:
RUSTFLAGS: -Dwarnings
RUST_BACKTRACE: 1
CARGO_TERM_COLOR: always
API_VERSION: 1

jobs:
tests:
runs-on: ubuntu-latest

strategy:
matrix:
python-version: [3.9]

steps:
- name: Checkout the repository
uses: actions/checkout@v3

- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal
components: llvm-tools-preview

- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov

- uses: Swatinem/rust-cache@v1

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip"

- name: Install package
run: make -C nucliadb_node_binding/ install-dev

- name: Run tests with coverage
run: make -C nucliadb_node_binding/ test-cov

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
files: ./nucliadb_node_binding/coverage.xml,./nucliadb_node_binding/coverage.lcov
flags: node-sidecar-binding
Loading

1 comment on commit eb30db7

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Benchmark suite Current: eb30db7 Previous: a40981d Ratio
nucliadb/tests/benchmarks/test_search.py::test_search_returns_labels 57.83844414002783 iter/sec (stddev: 0.0005596766763802534) 60.779932309336715 iter/sec (stddev: 0.0019119907918232523) 1.05
nucliadb/tests/benchmarks/test_search.py::test_search_relations 134.36071851552188 iter/sec (stddev: 0.0005610910306974682) 182.57436721258293 iter/sec (stddev: 0.0002220745559283828) 1.36

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.