Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
Common CI Configuration
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hive
Common CI Configuration
Merge requests
!15
Prerequisites for reusing `.pattern_tests_template` in Hived and HAF-apps CI
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Prerequisites for reusing `.pattern_tests_template` in Hived and HAF-apps CI
bw_reusing_pattern_tests_template_defs
into
develop
Overview
0
Commits
2
Pipelines
18
Changes
1
Merged
Bartek Wrona
requested to merge
bw_reusing_pattern_tests_template_defs
into
develop
1 year ago
Overview
0
Commits
2
Pipelines
18
Changes
1
Expand
0
0
Merge request reports
Compare
develop
version 14
4f4f7986
1 year ago
version 13
49530c2a
1 year ago
version 12
854ff670
1 year ago
version 11
84166622
1 year ago
version 10
57f28f71
1 year ago
version 9
a672413a
1 year ago
version 8
7623529b
1 year ago
version 7
28ba1148
1 year ago
version 6
f579fbe8
1 year ago
version 5
6d2e10ac
1 year ago
version 4
c3f50451
1 year ago
version 3
9ad9acc9
1 year ago
version 2
59fda797
1 year ago
version 1
13ad7c23
1 year ago
develop (base)
and
version 14
latest version
0da465dd
2 commits,
1 year ago
version 14
4f4f7986
2 commits,
1 year ago
version 13
49530c2a
2 commits,
1 year ago
version 12
854ff670
2 commits,
1 year ago
version 11
84166622
2 commits,
1 year ago
version 10
57f28f71
2 commits,
1 year ago
version 9
a672413a
2 commits,
1 year ago
version 8
7623529b
2 commits,
1 year ago
version 7
28ba1148
2 commits,
1 year ago
version 6
f579fbe8
2 commits,
1 year ago
version 5
6d2e10ac
2 commits,
1 year ago
version 4
c3f50451
2 commits,
1 year ago
version 3
9ad9acc9
2 commits,
1 year ago
version 2
59fda797
1 commit,
1 year ago
version 1
13ad7c23
1 commit,
1 year ago
1 file
+
97
−
9
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
templates/test_jobs.gitlab-ci.yml
+
97
−
9
Options
@@ -24,6 +24,85 @@ variables:
@@ -24,6 +24,85 @@ variables:
-
name
:
$APP_IMAGE
-
name
:
$APP_IMAGE
alias
:
app
alias
:
app
.pytest_based_template
:
variables
:
FF_NETWORK_PER_BUILD
:
1
JUNIT_REPORT
:
"
report.xml"
# should be ovverided by derived jobs
PYTEST_BASED_IMAGE_NAME
:
"
"
# "$CI_REGISTRY_IMAGE/ci-base-image$TEST_IMAGE_TAG"
POETRY_INSTALL_ROOT_DIR
:
"
"
# $CI_PROJECT_DIR/tests/hive-local-tools
interruptible
:
true
image
:
"
${PYTEST_BASED_IMAGE_NAME}"
before_script
:
-
python3 -m venv venv/
-
. venv/bin/activate
-
echo "Entering ${POETRY_INSTALL_ROOT_DIR}"
-
cd "${POETRY_INSTALL_ROOT_DIR}"
-
poetry install
artifacts
:
reports
:
junit
:
$JUNIT_REPORT
name
:
"
$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
paths
:
-
"
**/generated_during_*"
-
"
**/generated_by_package_fixtures"
when
:
always
expire_in
:
1 week
.pattern_test_executor
:
extends
:
.pytest_based_template
variables
:
TESTED_ENDPOINT
:
"
"
# To be overrided in derived job
TEST_SUITE
:
"
"
# To be overrided in derived job
PATTERN_TESTS_DIR
:
"
"
# To be overrided in derived job
DIRECT_CALLS
:
0
# To be overrided in derived job
script
:
# run pattern tests
-
cd "${PATTERN_TESTS_DIR}"
-
./run_tests.sh ${TESTED_ENDPOINT} `git rev-parse --show-toplevel` "${TEST_SUITE}" ${DIRECT_CALLS}
# Special version of pattern tests to be executed against Hived API node instance
# Defined here, to be shared between .comparison_tests_template and finally reused at Hived CI to verify AH node
.hived_pattern_tests_template
:
extends
:
.pattern_test_executor
variables
:
HIVED_IMAGE_NAME
:
"
"
# Must be overrided at derived job
TESTED_ENDPOINT
:
hived-instance:8091
services
:
-
name
:
$HIVED_IMAGE_NAME
alias
:
hived-instance
variables
:
DATADIR
:
$DATA_CACHE_HIVE/datadir
SHM_DIR
:
$DATA_CACHE_HIVE/shm_dir
LOG_FILE
:
$CI_JOB_NAME.log
command
:
[
"
--replay-blockchain"
,
"
--stop-replay-at-block=5000000"
]
.haf_app_pattern_tests_template
:
extends
:
.pattern_test_executor
variables
:
HAF_IMAGE_NAME
:
"
"
# Must be overrided at derived job
HAF_APP_IMAGE
:
"
"
# Image path name to be used at app testing. App will be instantiated as a service.
HAF_APP_PORT
:
"
"
# To be specified by derived job
TESTED_ENDPOINT
:
app:${HAF_APP_PORT}
services
:
-
name
:
${HAF_IMAGE_NAME}
alias
:
haf-instance
variables
:
# Allow access from any network to eliminate CI IP addressing problems
PG_ACCESS
:
"
host
haf_block_log
haf_app_admin
0.0.0.0/0
trust"
DATADIR
:
$DATA_CACHE_HAF/datadir
SHM_DIR
:
$DATA_CACHE_HAF/shm_dir
LOG_FILE
:
$CI_JOB_NAME.log
command
:
[
"
--replay-blockchain"
,
"
--stop-replay-at-block=5000000"
]
-
name
:
${HAF_APP_IMAGE}
alias
:
app
.tox_test_job
:
.tox_test_job
:
image
:
registry.gitlab.syncad.com/hive/common-ci-configuration/tox-test-runner:${TOX_IMAGE_TAG}
image
:
registry.gitlab.syncad.com/hive/common-ci-configuration/tox-test-runner:${TOX_IMAGE_TAG}
artifacts
:
artifacts
:
@@ -48,15 +127,24 @@ variables:
@@ -48,15 +127,24 @@ variables:
alias
:
app
alias
:
app
.comparison_tests_template
:
.comparison_tests_template
:
extends
:
.pattern_tests_template
extends
:
.
haf_app_
pattern_tests_template
variables
:
variables
:
COMPARISON_TESTS_DIR
:
"
"
# Must be specified by derived job
HIVED_ENDPOINT
:
hived-instance:8091
HIVED_ENDPOINT
:
hived-instance:8091
JUNIT_REPORT
:
"
comparsion_tests.xml"
services
:
services
:
-
!reference
[
.pattern_tests_template
,
services
]
-
!reference
[
.hived_pattern_tests_template
,
services
]
-
name
:
$HIVED_IMAGE_NAME
-
!reference
[
.haf_app_pattern_tests_template
,
services
]
alias
:
hived-instance
script
:
variables
:
-
cd "${COMPARISON_TESTS_DIR}"
DATADIR
:
$DATA_CACHE_HIVE/datadir
-
pytest -n 8 --junitxml="${JUNIT_REPORT}" --ref http://$HIVED_ENDPOINT --test http://$TESTED_ENDPOINT --start 4900000 --stop
4915000
SHM_DIR
:
$DATA_CACHE_HIVE/shm_dir
LOG_FILE
:
$CI_JOB_NAME.log
artifacts
:
command
:
[
"
--replay-blockchain"
,
"
--stop-replay-at-block=5000000"
]
paths
:
-
"
$CI_JOB_NAME"
-
"
**/from_node.log"
-
"
**/ah.log"
-
"
**/*.out.json"
-
"
${COMPARISON_TESTS_DIR}/comparsion_tests.xml"
Loading