2020-08-02 13:10:28 +03:00
|
|
|
#!/usr/bin/env bash
|
2020-05-23 14:15:41 +03:00
|
|
|
set -eu
|
|
|
|
|
2020-08-22 20:41:39 +03:00
|
|
|
export RUST_MIN_STACK=16777216
|
2020-02-17 04:47:12 +03:00
|
|
|
export CARGO_INCREMENTAL=0
|
2020-05-23 14:15:41 +03:00
|
|
|
export RUSTFLAGS="-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests"
|
|
|
|
export RUSTDOCFLAGS="-Cpanic=abort"
|
2020-08-01 10:57:36 +03:00
|
|
|
export CARGO_TARGET_DIR=".COVERAGE_DIR"
|
2020-02-16 15:06:25 +03:00
|
|
|
|
2020-08-02 13:10:28 +03:00
|
|
|
git clone https://github.com/swc-project/ts-parser-test-ref.git ecmascript/parser/tests/typescript/tsc || true
|
|
|
|
(cd ecmascript/parser/tests/typescript/tsc && git pull)
|
2020-06-02 13:22:41 +03:00
|
|
|
|
2020-08-22 20:41:39 +03:00
|
|
|
cargo test --all --all-features --exclude node-swc --exclude wasm
|
2020-02-16 15:06:25 +03:00
|
|
|
|
2020-08-22 20:41:39 +03:00
|
|
|
zip -0 ccov.zip `find $CARGO_TARGET_DIR \( -name "swc*.gc*" -o -name 'spack*.gc*' -o -name 'ast_node*.gc*' -o -name 'enum_kind*.gc*' -o -name 'string-enum*.gc*' -o -name 'from_variant*.gc*' \) -print`;
|
2020-02-16 15:06:25 +03:00
|
|
|
|
|
|
|
grcov ccov.zip -s . -t lcov --llvm --branch --ignore-not-existing --ignore "/*" -o lcov.info;
|
|
|
|
|
2020-08-01 10:57:36 +03:00
|
|
|
bash <(curl -s https://codecov.io/bash) -f lcov.info
|