Skip to content

Commit

Permalink
Merge pull request #1504 from nearprotocol/v0.4.0
Browse files Browse the repository at this point in the history
Release 0.4.0
  • Loading branch information
bowenwang1996 committed Oct 21, 2019
2 parents 5dab64f + 122dfec commit 8f488f3
Show file tree
Hide file tree
Showing 254 changed files with 137,886 additions and 116,166 deletions.
5 changes: 1 addition & 4 deletions .gitattributes
@@ -1,6 +1,3 @@
Cargo.lock linguist-generated=true -diff
core/protos/src/autogenerated/* linguist-generated=true -diff
nearlib/protos.js linguist-generated=true -diff
pynear/**/protos/* linguist-generated=true -diff
**/package-lock.json linguist-generated=true -diff
nearlib/dist/** linguist-generated=true -diff
near/res/testnet.json linguist-generated=true -diff
86 changes: 13 additions & 73 deletions .gitlab-ci.yml
@@ -1,120 +1,60 @@
image: parity/rust:a811bb14-20190522
stages:
- test

variables:
CI_SERVER_NAME: "GitLab CI"
CACHE_ROOT: "/tmp/cache/nearcore/${CI_JOB_NAME}"
CARGO_HOME: "/tmp/cache/nearcore/${CI_JOB_NAME}/cargo"
BUILD_TARGET: ubuntu
BUILD_ARCH: amd64
CARGO_TARGET: x86_64-unknown-linux-gnu
APT_CACHE_DIR: apt-cache

.setup_rust: &setup_rust
rustup default nightly
CACHE_ROOT: "/opt/nearcore"

.setup_cache: &setup_cache
mkdir -p "${CACHE_ROOT}/target" &&
ln -s "${CACHE_ROOT}/target" "${CI_PROJECT_DIR}/target"

.cleanup_obsolete_cache: &cleanup_obsolete_cache
find "${CACHE_ROOT}/target" -mmin +43200 -exec rm -rf {} \;

.code_coverage: &code_coverage
mkdir -pv $APT_CACHE_DIR && apt-get -qq update &&
apt-get -qq -o dir::cache::archives="$APT_CACHE_DIR" install -y binutils-dev libcurl4-openssl-dev zlib1g-dev libdw-dev libiberty-dev cmake gcc &&
./scripts/coverage.sh

stages:
- test

cache:
paths:
- apt-cache

# Test all but expensive integration tests.
test_cargo:
stage: test
tags:
- gcloud
- shell
before_script:
- *setup_rust
#- rustup component add clippy
- *setup_cache
script:
- rustc --version && cargo --version
- cargo check --all --tests --benches
- cargo check --all --tests --benches --all-features
- cargo test --all --verbose
after_script:
- *cleanup_obsolete_cache

# Regression tests.
test_regression:
stage: test
before_script:
- *setup_rust
- *setup_cache
script:
- rustc --version && cargo --version
- ./scripts/build_wasm.sh
- cargo test --package nearcore --test test_tps_regression test --features "regression_tests"
- cargo test --package nearcore --test test_tps_regression test --features "regression_tests,fake_crypto"
tags:
- regression_tests
after_script:
- *cleanup_obsolete_cache
- shell
- regression_tests
only:
- schedules
- schedules

# A set of expensive tests.
test_cases_testnet_rpc:
stage: test
before_script:
- *setup_rust
- *setup_cache
script:
- rustc --version && cargo --version
- ./scripts/build_wasm.sh
- cargo test --package nearcore --test test_cases_testnet_rpc test --features "expensive_tests"
tags:
- expensive_tests
after_script:
- *cleanup_obsolete_cache
- shell
- expensive_tests
only:
- schedules
- schedules

#
#coverage:
# stage: test
# before_script:
# - *setup_rust
# - *setup_cache
# script:
# - ./scripts/build_wasm.sh
# - cargo test --all --no-run
# - *code_coverage
#
test_nearlib:
stage: test
tags:
- gcloud
- shell
before_script:
- *setup_rust
- *setup_cache
script:
- ./scripts/test_nearlib.sh

after_script:
- *cleanup_obsolete_cache

test_nearlib_release:
stage: test
tags:
- gcloud
before_script:
- *setup_rust
- *setup_cache
script:
- export NEARLIB_RELEASE=true
- ./scripts/test_nearlib.sh

after_script:
- *cleanup_obsolete_cache
2 changes: 1 addition & 1 deletion CODEOWNERS
Validating CODEOWNERS rules …
@@ -1,5 +1,5 @@
# CODEOWNERS: https://help.github.com/articles/about-codeowners/

/chain/ @ilblackdragon
/chain/ @ilblackdragon @SkidanovAlex

/runtime/ @nearmax @evgenykuzyakov

0 comments on commit 8f488f3

Please sign in to comment.