Skip to content
Snippets Groups Projects
Commit c949d5a0 authored by Cédric Moreau's avatar Cédric Moreau
Browse files

[enh] ci: split the tests into 3 parts: unit, sync Ğ1, sync ĞTest

parent 9dad9f67
No related branches found
No related tags found
No related merge requests found
...@@ -33,14 +33,17 @@ push_to_github: ...@@ -33,14 +33,17 @@ push_to_github:
before_script: before_script:
- export NVM_DIR="$HOME/.nvm" - export NVM_DIR="$HOME/.nvm"
- . "$NVM_DIR/nvm.sh" - . "$NVM_DIR/nvm.sh"
build: .cached: &cached
<<: *nvm_env
stage: build
cache: cache:
untracked: true untracked: true
paths: paths:
- node_modules/ - node_modules/
build:
<<: *nvm_env
<<: *cached
stage: build
script: script:
- yarn - yarn
...@@ -70,16 +73,12 @@ pages: ...@@ -70,16 +73,12 @@ pages:
test: test:
<<: *nvm_env <<: *nvm_env
<<: *cached
stage: test stage: test
cache:
untracked: true
paths:
- node_modules/
script: script:
- yarn test - yarn test
# Clean the dump directory before testing # Clean the dump directory before testing
- rm -rf /tmp/duniter_ci_dump/ - rm -rf /tmp/duniter_ci_dump/
- mkdir -p /tmp/duniter_ci_dump/
# Code coverage display in GitLab # Code coverage display in GitLab
- tar cvzf coverage.tar.gz coverage/ - tar cvzf coverage.tar.gz coverage/
- sed -n 23p coverage/index.html | grep -Po "\d+.\d+" | sed -e "s/\(.*\)/<coverage>\1%<\/coverage>/" - sed -n 23p coverage/index.html | grep -Po "\d+.\d+" | sed -e "s/\(.*\)/<coverage>\1%<\/coverage>/"
...@@ -89,18 +88,18 @@ test: ...@@ -89,18 +88,18 @@ test:
- coverage.tar.gz - coverage.tar.gz
expire_in: 4h expire_in: 4h
test_sync: sync_g1:
<<: *nvm_env <<: *nvm_env
<<: *cached
stage: test stage: test
cache:
untracked: true
paths:
- node_modules/
script: script:
# Clean the dump directory before testing
- rm -rf /tmp/duniter_ci_dump/
- mkdir -p /tmp/duniter_ci_dump/
- bash .gitlab/test/check_g1_sync.sh - bash .gitlab/test/check_g1_sync.sh
sync_gtest:
<<: *nvm_env
<<: *cached
stage: test
script:
- bash .gitlab/test/check_gt_sync.sh - bash .gitlab/test/check_gt_sync.sh
.build_releases: &build_releases .build_releases: &build_releases
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
ORIGIN_DIR=`pwd` ORIGIN_DIR=`pwd`
mkdir -p $1 mkdir -p $1
DUMP_DIR=`cd $1 && pwd` DUMP_DIR=`cd $1 && pwd`
ARCHIVES="$DUMP_DIR/archives"
CURRENCY=$2 CURRENCY=$2
ARCHIVES="$DUMP_DIR/archives_$CURRENCY"
DB_TEST="gitlab_ci_sync_test_$CURRENCY" DB_TEST="gitlab_ci_sync_test_$CURRENCY"
G1_TARGET_BLOCK=$3 # This is a fixed block# which determines to the sha1 hashes G1_TARGET_BLOCK=$3 # This is a fixed block# which determines to the sha1 hashes
G1_IINDEX_CS=$4 G1_IINDEX_CS=$4
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment