-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
disabled
- Loading branch information
Showing
3 changed files
with
103 additions
and
103 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,97 +1,97 @@ | ||
name: Code Coverage | ||
on: | ||
workflow_call: | ||
inputs: | ||
skip_tests: | ||
type: boolean | ||
default: false | ||
required: false | ||
# DO NOT CHANGE NAME OF WORKFLOW, USED IN OTHER WORKFLOWS KEEP "Rust Tests" | ||
jobs: | ||
code-coverage: | ||
if: ${{ !inputs.skip_tests }} | ||
name: Code Coverage | ||
runs-on: ubuntu-latest | ||
env: | ||
RUSTC_WRAPPER: sccache | ||
SCCACHE_CACHE_SIZE: 2G | ||
SCCACHE_DIR: /home/runner/.cache/sccache | ||
SCCACHE_PATH: /home/runner/.cache/sccache | ||
steps: | ||
- uses: actions/checkout@v3 | ||
name: Checkout | ||
- name: Cache sccache | ||
uses: actions/cache@v3 | ||
with: | ||
path: /home/runner/.cache/sccache | ||
key: codecov-${{ runner.os }}-sccache-${{ hashFiles('**/Cargo.lock') }} | ||
restore-keys: | | ||
codecov-${{ runner.os }}-sccache- | ||
- name: Set up cargo cache | ||
uses: actions/cache@v3 | ||
continue-on-error: false | ||
with: | ||
path: | | ||
~/.cargo/bin/ | ||
~/.cargo/registry/index/ | ||
~/.cargo/registry/cache/ | ||
~/.cargo/git/db/ | ||
target/debug | ||
target/release | ||
key: codecov-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-coverage | ||
restore-keys: codecov-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-coverage | ||
- uses: actions-rs/toolchain@v1 | ||
name: Setup Rust | ||
with: | ||
toolchain: nightly | ||
override: true | ||
components: rustfmt, clippy | ||
- name: Install sccache (Ubuntu) | ||
run: | | ||
curl -L https://github.com/mozilla/sccache/releases/download/v0.5.4/sccache-v0.5.4-x86_64-unknown-linux-musl.tar.gz | tar xz | ||
sudo mv sccache-v0.5.4-x86_64-unknown-linux-musl/sccache /usr/local/bin/ | ||
- name: Start sccache server | ||
run: sccache --start-server | ||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
cache: 'pip' | ||
- name: Run Maturin develop | ||
uses: PyO3/maturin-action@v1 | ||
with: | ||
working-directory: ./python | ||
command: build | ||
sccache: true | ||
- name: Install Python dependencies | ||
run: | | ||
python -m pip install -q pytest networkx numpy seaborn pandas nbmake pytest-xdist matplotlib pyvis pytest-cov coverage | ||
python -m pip install target/wheels/raphtory-*.whl | ||
- name: Run tests (rust) | ||
run: cargo test -p raphtory --features "io python" | ||
env: | ||
CARGO_INCREMENTAL: '0' | ||
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests' | ||
RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests' | ||
- name: Run tests (python) | ||
run: cargo test -p raphtory-pymodule --no-default-features | ||
env: | ||
CARGO_INCREMENTAL: '0' | ||
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests' | ||
RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests' | ||
- id: coveragerust | ||
name: Run rust tests (rust-grcov) and collect coverage | ||
uses: actions-rs/[email protected] | ||
- name: Run python tests and collect coverage | ||
run: cd python/tests && pytest --cov=./ --cov-report=xml | ||
- name: Codecov | ||
uses: codecov/[email protected] | ||
with: | ||
verbose: true | ||
fail_ci_if_error: false | ||
files: ./coverage.xml, ${{ steps.coveragerust.outputs.report }} | ||
- name: Print sccache stats | ||
run: sccache --show-stats | ||
- name: Stop sccache server | ||
run: sccache --stop-server || true | ||
# name: Code Coverage | ||
# on: | ||
# workflow_call: | ||
# inputs: | ||
# skip_tests: | ||
# type: boolean | ||
# default: false | ||
# required: false | ||
# # DO NOT CHANGE NAME OF WORKFLOW, USED IN OTHER WORKFLOWS KEEP "Rust Tests" | ||
# jobs: | ||
# code-coverage: | ||
# if: ${{ !inputs.skip_tests }} | ||
# name: Code Coverage | ||
# runs-on: ubuntu-latest | ||
# env: | ||
# RUSTC_WRAPPER: sccache | ||
# SCCACHE_CACHE_SIZE: 2G | ||
# SCCACHE_DIR: /home/runner/.cache/sccache | ||
# SCCACHE_PATH: /home/runner/.cache/sccache | ||
# steps: | ||
# - uses: actions/checkout@v3 | ||
# name: Checkout | ||
# - name: Cache sccache | ||
# uses: actions/cache@v3 | ||
# with: | ||
# path: /home/runner/.cache/sccache | ||
# key: codecov-${{ runner.os }}-sccache-${{ hashFiles('**/Cargo.lock') }} | ||
# restore-keys: | | ||
# codecov-${{ runner.os }}-sccache- | ||
# - name: Set up cargo cache | ||
# uses: actions/cache@v3 | ||
# continue-on-error: false | ||
# with: | ||
# path: | | ||
# ~/.cargo/bin/ | ||
# ~/.cargo/registry/index/ | ||
# ~/.cargo/registry/cache/ | ||
# ~/.cargo/git/db/ | ||
# target/debug | ||
# target/release | ||
# key: codecov-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-coverage | ||
# restore-keys: codecov-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-coverage | ||
# - uses: actions-rs/toolchain@v1 | ||
# name: Setup Rust | ||
# with: | ||
# toolchain: nightly | ||
# override: true | ||
# components: rustfmt, clippy | ||
# - name: Install sccache (Ubuntu) | ||
# run: | | ||
# curl -L https://github.com/mozilla/sccache/releases/download/v0.5.4/sccache-v0.5.4-x86_64-unknown-linux-musl.tar.gz | tar xz | ||
# sudo mv sccache-v0.5.4-x86_64-unknown-linux-musl/sccache /usr/local/bin/ | ||
# - name: Start sccache server | ||
# run: sccache --start-server | ||
# - name: Setup Python | ||
# uses: actions/setup-python@v4 | ||
# with: | ||
# python-version: "3.10" | ||
# cache: 'pip' | ||
# - name: Run Maturin develop | ||
# uses: PyO3/maturin-action@v1 | ||
# with: | ||
# working-directory: ./python | ||
# command: build | ||
# sccache: true | ||
# - name: Install Python dependencies | ||
# run: | | ||
# python -m pip install -q pytest networkx numpy seaborn pandas nbmake pytest-xdist matplotlib pyvis pytest-cov coverage | ||
# python -m pip install target/wheels/raphtory-*.whl | ||
# - name: Run tests (rust) | ||
# run: cargo test -p raphtory --features "io python" | ||
# env: | ||
# CARGO_INCREMENTAL: '0' | ||
# RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests' | ||
# RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests' | ||
# - name: Run tests (python) | ||
# run: cargo test -p raphtory-pymodule --no-default-features | ||
# env: | ||
# CARGO_INCREMENTAL: '0' | ||
# RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests' | ||
# RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests' | ||
# - id: coveragerust | ||
# name: Run rust tests (rust-grcov) and collect coverage | ||
# uses: actions-rs/[email protected] | ||
# - name: Run python tests and collect coverage | ||
# run: cd python/tests && pytest --cov=./ --cov-report=xml | ||
# - name: Codecov | ||
# uses: codecov/[email protected] | ||
# with: | ||
# verbose: true | ||
# fail_ci_if_error: false | ||
# files: ./coverage.xml, ${{ steps.coveragerust.outputs.report }} | ||
# - name: Print sccache stats | ||
# run: sccache --show-stats | ||
# - name: Stop sccache server | ||
# run: sccache --stop-server || true | ||
|
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
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