1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-11-14 04:19:09 +00:00
trezor-wallet/.gitlab-ci.yml

191 lines
4.5 KiB
YAML
Raw Normal View History

Integration tests (#311) * Add base test env * Add eslint rules for cypress * Add configs and scripts in package json * Added docker file for bridge and emualator * Bridge install progress * Bridge install next step * Add task for integration tests * Fixed deps * Added baseUrl * Added baseUrl fix * Added npx * Added caching for cypress bin * Added path to binary * Install cypress * Finalized dockerfile * Fixed bridge lib path * Fixed path for binary * Adjust script again * Run all the things properly * Try to run the tests * First POC test * First POC test in gitlab * Fixed flow * Fixed gitlab test url, try docker service * export artifacts * Test only integration tests in CI * Test only integration tests in CI 2 * Test only integration tests in CI 3 * Added tests for initialize device * Try to add docker in only one step * Turn on other integration steps * Correct node version * Ignore cache in flow * Run bridge and emulator in debug link mode * Fix param * Try to run new config in CI * init device in docker * Remove docker image after run * Remove amp * Fix path * Artifacts on fail * Artifacts on fail with volume * Artifacts on fail with volume 2 * Install mkdir * Install mkdir again * test * test 2 * test 3 * test 4 * test 5 * test 6 * test 7 * test 8 * test 9 * test 10 * test 11 * test 12 * test 13 * test 14 * test 15 * test 16 * test 17 * Revert "test 17" This reverts commit f3f6c0d6906cdc470aa11ae728b4b61a6b71a732. * test 18 * test 19 * test 20 * test 21 try chrome * test 22 * test 23 * test 24 * test 25 * test 25 try to install chrome again * test 25 try to install chrome again * Added missing deps * Added debug * Install chromium * Install chromium 2 * turn on chromium * turn off debug * turn on debug * fix folder * turn off debug * Fix init device * Add header dashboard test * Bring things back * clean * clean fix * Build image in CI * Added stage step * Added docker image * Added service * Added tests to docker image * Refactor a bit * Correct registry image * Build wallet again * Add test for dashbaord content * new node version, more tests * Remove unused code * typo * Correct snapshots, moved deps to dev, beta disclaimer prop
2019-02-05 13:26:40 +00:00
image: node:10.15.1
variables:
CYPRESS_CACHE_FOLDER: "$CI_PROJECT_DIR/cache/Cypress"
2018-10-01 13:12:54 +00:00
2019-04-25 14:17:28 +00:00
before_script:
- "apt-get update"
- "apt-get install -y build-essential"
2018-10-22 11:04:16 +00:00
cache:
2019-01-03 13:38:50 +00:00
key: ${CI_COMMIT_REF_SLUG}
2018-10-22 11:04:16 +00:00
paths:
- node_modules
Integration tests (#311) * Add base test env * Add eslint rules for cypress * Add configs and scripts in package json * Added docker file for bridge and emualator * Bridge install progress * Bridge install next step * Add task for integration tests * Fixed deps * Added baseUrl * Added baseUrl fix * Added npx * Added caching for cypress bin * Added path to binary * Install cypress * Finalized dockerfile * Fixed bridge lib path * Fixed path for binary * Adjust script again * Run all the things properly * Try to run the tests * First POC test * First POC test in gitlab * Fixed flow * Fixed gitlab test url, try docker service * export artifacts * Test only integration tests in CI * Test only integration tests in CI 2 * Test only integration tests in CI 3 * Added tests for initialize device * Try to add docker in only one step * Turn on other integration steps * Correct node version * Ignore cache in flow * Run bridge and emulator in debug link mode * Fix param * Try to run new config in CI * init device in docker * Remove docker image after run * Remove amp * Fix path * Artifacts on fail * Artifacts on fail with volume * Artifacts on fail with volume 2 * Install mkdir * Install mkdir again * test * test 2 * test 3 * test 4 * test 5 * test 6 * test 7 * test 8 * test 9 * test 10 * test 11 * test 12 * test 13 * test 14 * test 15 * test 16 * test 17 * Revert "test 17" This reverts commit f3f6c0d6906cdc470aa11ae728b4b61a6b71a732. * test 18 * test 19 * test 20 * test 21 try chrome * test 22 * test 23 * test 24 * test 25 * test 25 try to install chrome again * test 25 try to install chrome again * Added missing deps * Added debug * Install chromium * Install chromium 2 * turn on chromium * turn off debug * turn on debug * fix folder * turn off debug * Fix init device * Add header dashboard test * Bring things back * clean * clean fix * Build image in CI * Added stage step * Added docker image * Added service * Added tests to docker image * Refactor a bit * Correct registry image * Build wallet again * Add test for dashbaord content * new node version, more tests * Remove unused code * typo * Correct snapshots, moved deps to dev, beta disclaimer prop
2019-02-05 13:26:40 +00:00
- ${CYPRESS_CACHE_FOLDER}
2018-10-22 11:04:16 +00:00
stages:
- test
- build
- deploy
Integration tests (#311) * Add base test env * Add eslint rules for cypress * Add configs and scripts in package json * Added docker file for bridge and emualator * Bridge install progress * Bridge install next step * Add task for integration tests * Fixed deps * Added baseUrl * Added baseUrl fix * Added npx * Added caching for cypress bin * Added path to binary * Install cypress * Finalized dockerfile * Fixed bridge lib path * Fixed path for binary * Adjust script again * Run all the things properly * Try to run the tests * First POC test * First POC test in gitlab * Fixed flow * Fixed gitlab test url, try docker service * export artifacts * Test only integration tests in CI * Test only integration tests in CI 2 * Test only integration tests in CI 3 * Added tests for initialize device * Try to add docker in only one step * Turn on other integration steps * Correct node version * Ignore cache in flow * Run bridge and emulator in debug link mode * Fix param * Try to run new config in CI * init device in docker * Remove docker image after run * Remove amp * Fix path * Artifacts on fail * Artifacts on fail with volume * Artifacts on fail with volume 2 * Install mkdir * Install mkdir again * test * test 2 * test 3 * test 4 * test 5 * test 6 * test 7 * test 8 * test 9 * test 10 * test 11 * test 12 * test 13 * test 14 * test 15 * test 16 * test 17 * Revert "test 17" This reverts commit f3f6c0d6906cdc470aa11ae728b4b61a6b71a732. * test 18 * test 19 * test 20 * test 21 try chrome * test 22 * test 23 * test 24 * test 25 * test 25 try to install chrome again * test 25 try to install chrome again * Added missing deps * Added debug * Install chromium * Install chromium 2 * turn on chromium * turn off debug * turn on debug * fix folder * turn off debug * Fix init device * Add header dashboard test * Bring things back * clean * clean fix * Build image in CI * Added stage step * Added docker image * Added service * Added tests to docker image * Refactor a bit * Correct registry image * Build wallet again * Add test for dashbaord content * new node version, more tests * Remove unused code * typo * Correct snapshots, moved deps to dev, beta disclaimer prop
2019-02-05 13:26:40 +00:00
- integration tests
2018-10-22 10:25:12 +00:00
2018-10-22 11:04:16 +00:00
lint:
stage: test
script:
2018-10-25 13:56:55 +00:00
- yarn install
2018-10-22 11:04:16 +00:00
- yarn run lint
2018-10-01 13:12:54 +00:00
flow:
2018-10-22 11:04:16 +00:00
stage: test
2018-10-01 13:12:54 +00:00
script:
2019-01-03 13:42:20 +00:00
- yarn install
2018-10-01 13:12:54 +00:00
- yarn run flow
2018-10-23 14:31:10 +00:00
unit:
2018-10-22 11:04:16 +00:00
stage: test
2018-10-01 13:12:54 +00:00
script:
2018-10-25 13:56:55 +00:00
- yarn install
2018-10-22 11:04:16 +00:00
- yarn run test
2018-10-01 13:12:54 +00:00
2018-10-23 14:29:33 +00:00
build development:
2018-10-22 11:04:16 +00:00
stage: build
2018-10-01 13:12:54 +00:00
script:
2018-10-25 13:56:55 +00:00
- yarn install
2018-10-22 11:04:16 +00:00
- yarn run build:dev
artifacts:
2018-10-25 14:00:29 +00:00
expire_in: 1 week
2018-10-22 11:04:16 +00:00
paths:
2018-10-23 14:48:54 +00:00
- build/dev
2018-10-22 11:04:16 +00:00
2018-10-23 14:29:33 +00:00
build beta:
2018-10-22 11:04:16 +00:00
stage: build
script:
2018-10-25 13:56:55 +00:00
- yarn install
2018-10-22 11:04:16 +00:00
- yarn run build:beta
only:
- beta
2018-10-22 11:04:16 +00:00
artifacts:
2018-10-25 14:00:29 +00:00
expire_in: 1 week
2018-10-22 11:04:16 +00:00
paths:
2018-10-23 14:48:54 +00:00
- build/beta
2018-10-25 13:39:17 +00:00
- scripts/s3sync.sh
2018-10-22 11:04:16 +00:00
2018-10-25 12:47:39 +00:00
build stable:
2018-10-22 11:04:16 +00:00
stage: build
script:
2018-10-25 13:56:55 +00:00
- yarn install
2018-10-24 21:01:23 +00:00
- yarn run build:stable
only:
- stable
2018-10-22 11:04:16 +00:00
artifacts:
2018-10-25 14:00:29 +00:00
expire_in: 1 week
2018-10-22 11:04:16 +00:00
paths:
2018-10-24 21:01:23 +00:00
- build/stable
Integration tests (#311) * Add base test env * Add eslint rules for cypress * Add configs and scripts in package json * Added docker file for bridge and emualator * Bridge install progress * Bridge install next step * Add task for integration tests * Fixed deps * Added baseUrl * Added baseUrl fix * Added npx * Added caching for cypress bin * Added path to binary * Install cypress * Finalized dockerfile * Fixed bridge lib path * Fixed path for binary * Adjust script again * Run all the things properly * Try to run the tests * First POC test * First POC test in gitlab * Fixed flow * Fixed gitlab test url, try docker service * export artifacts * Test only integration tests in CI * Test only integration tests in CI 2 * Test only integration tests in CI 3 * Added tests for initialize device * Try to add docker in only one step * Turn on other integration steps * Correct node version * Ignore cache in flow * Run bridge and emulator in debug link mode * Fix param * Try to run new config in CI * init device in docker * Remove docker image after run * Remove amp * Fix path * Artifacts on fail * Artifacts on fail with volume * Artifacts on fail with volume 2 * Install mkdir * Install mkdir again * test * test 2 * test 3 * test 4 * test 5 * test 6 * test 7 * test 8 * test 9 * test 10 * test 11 * test 12 * test 13 * test 14 * test 15 * test 16 * test 17 * Revert "test 17" This reverts commit f3f6c0d6906cdc470aa11ae728b4b61a6b71a732. * test 18 * test 19 * test 20 * test 21 try chrome * test 22 * test 23 * test 24 * test 25 * test 25 try to install chrome again * test 25 try to install chrome again * Added missing deps * Added debug * Install chromium * Install chromium 2 * turn on chromium * turn off debug * turn on debug * fix folder * turn off debug * Fix init device * Add header dashboard test * Bring things back * clean * clean fix * Build image in CI * Added stage step * Added docker image * Added service * Added tests to docker image * Refactor a bit * Correct registry image * Build wallet again * Add test for dashbaord content * new node version, more tests * Remove unused code * typo * Correct snapshots, moved deps to dev, beta disclaimer prop
2019-02-05 13:26:40 +00:00
- scripts/s3sync.sh
2019-04-25 11:22:52 +00:00
# build emulator and bridge image:
# variables:
# CONTAINER_NAME: "$CI_REGISTRY/emulator-bridge-tests"
# image: docker:latest
# services:
# - docker:dind
# before_script:
# - docker login $CI_REGISTRY -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD
# stage: build
# when: manual
# script:
# - docker pull $CONTAINER_NAME:latest || true
# - docker build --cache-from $CONTAINER_NAME:latest --tag $CONTAINER_NAME:$CI_COMMIT_SHA --tag $CONTAINER_NAME:latest .
# - docker push $CONTAINER_NAME:$CI_COMMIT_SHA
# - docker push $CONTAINER_NAME:latest
2018-10-23 14:29:33 +00:00
deploy review:
stage: deploy
variables:
GIT_STRATEGY: none
dependencies:
- build development
2018-11-16 14:16:24 +00:00
environment:
name: $CI_BUILD_REF_NAME
url: $BASE_REVIEW_URL/$CI_BUILD_REF_NAME
2018-11-26 15:39:51 +00:00
on_stop: delete review
2019-04-25 14:30:57 +00:00
before_script: []
2018-10-23 14:29:33 +00:00
script:
- echo "Deploy a review app"
- '[ -z "${DEPLOY_BASE_DIR}" ] && echo "Deploy base dir cannot be empty" && exit 255'
- env
- mkdir -p "${DEPLOY_BASE_DIR}/${CI_BUILD_REF_NAME}"
- echo "Copy dev build to web server ${DEPLOY_BASE_DIR}/${CI_BUILD_REF_NAME}..."
- rsync --delete -va build/dev/ "${DEPLOY_BASE_DIR}/${CI_BUILD_REF_NAME}/"
- curl "https://api.telegram.org/bot699197118:AAGXNTaC5Q-ljmy_dMvaIvAKy1XjlkA3Iss/sendMessage?chat_id=-1001354778014&text=https://trezor-wallet-dev.trezor.io/${CI_BUILD_REF_NAME}"
2018-12-12 14:50:30 +00:00
- 'echo "Remove working dir, workaround for cache" && rm -r ./*'
2018-10-23 14:29:33 +00:00
only:
- branches
tags:
- deploy
2018-10-25 12:47:39 +00:00
deploy stage beta:
stage: deploy
variables:
GIT_STRATEGY: none
2018-10-25 13:39:17 +00:00
AWS_ACCESS_KEY_ID: $STAGE_AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $STAGE_AWS_SECRET_ACCESS_KEY
2018-10-25 12:50:15 +00:00
when: manual
2018-10-25 12:47:39 +00:00
dependencies:
- build beta
2019-04-25 14:30:57 +00:00
before_script: []
2018-10-25 12:47:39 +00:00
script:
2018-10-25 13:53:02 +00:00
- scripts/s3sync.sh stage beta
2018-10-25 12:47:39 +00:00
only:
- beta
tags:
- deploy
deploy stage stable:
stage: deploy
variables:
GIT_STRATEGY: none
2018-10-25 13:39:17 +00:00
AWS_ACCESS_KEY_ID: $STAGE_AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $STAGE_AWS_SECRET_ACCESS_KEY
2018-10-25 12:50:15 +00:00
when: manual
2018-10-25 12:47:39 +00:00
dependencies:
- build stable
2019-04-25 14:30:57 +00:00
before_script: []
2018-10-25 12:47:39 +00:00
script:
2018-10-25 13:53:02 +00:00
- scripts/s3sync.sh stage stable
2018-10-25 12:47:39 +00:00
only:
- stable
tags:
- deploy
2018-11-26 15:39:51 +00:00
delete review:
before_script: []
stage: deploy
variables:
GIT_STRATEGY: none
when: manual
environment:
name: $CI_BUILD_REF_NAME
action: stop
2019-04-25 14:30:57 +00:00
before_script: []
2018-11-26 15:39:51 +00:00
script:
- '[ -z "${DEPLOY_BASE_DIR}" ] && echo "Deploy dir can not be empty" && exit 1'
- '[ -z "${CI_BUILD_REF_NAME}" ] && echo "Build name can not be empty" && exit 1'
- '[ ! -d "${DEPLOY_BASE_DIR}/${CI_BUILD_REF_NAME}" ] && echo "Folder can not be found, skipping..." && exit 0'
- 'rm -r "${DEPLOY_BASE_DIR}/${CI_BUILD_REF_NAME}"'
only:
- branches
tags:
- deploy
Integration tests (#311) * Add base test env * Add eslint rules for cypress * Add configs and scripts in package json * Added docker file for bridge and emualator * Bridge install progress * Bridge install next step * Add task for integration tests * Fixed deps * Added baseUrl * Added baseUrl fix * Added npx * Added caching for cypress bin * Added path to binary * Install cypress * Finalized dockerfile * Fixed bridge lib path * Fixed path for binary * Adjust script again * Run all the things properly * Try to run the tests * First POC test * First POC test in gitlab * Fixed flow * Fixed gitlab test url, try docker service * export artifacts * Test only integration tests in CI * Test only integration tests in CI 2 * Test only integration tests in CI 3 * Added tests for initialize device * Try to add docker in only one step * Turn on other integration steps * Correct node version * Ignore cache in flow * Run bridge and emulator in debug link mode * Fix param * Try to run new config in CI * init device in docker * Remove docker image after run * Remove amp * Fix path * Artifacts on fail * Artifacts on fail with volume * Artifacts on fail with volume 2 * Install mkdir * Install mkdir again * test * test 2 * test 3 * test 4 * test 5 * test 6 * test 7 * test 8 * test 9 * test 10 * test 11 * test 12 * test 13 * test 14 * test 15 * test 16 * test 17 * Revert "test 17" This reverts commit f3f6c0d6906cdc470aa11ae728b4b61a6b71a732. * test 18 * test 19 * test 20 * test 21 try chrome * test 22 * test 23 * test 24 * test 25 * test 25 try to install chrome again * test 25 try to install chrome again * Added missing deps * Added debug * Install chromium * Install chromium 2 * turn on chromium * turn off debug * turn on debug * fix folder * turn off debug * Fix init device * Add header dashboard test * Bring things back * clean * clean fix * Build image in CI * Added stage step * Added docker image * Added service * Added tests to docker image * Refactor a bit * Correct registry image * Build wallet again * Add test for dashbaord content * new node version, more tests * Remove unused code * typo * Correct snapshots, moved deps to dev, beta disclaimer prop
2019-02-05 13:26:40 +00:00
2019-04-12 13:30:21 +00:00
# integration tests:
# image: docker:latest
# services:
# - docker:dind
# stage: integration tests
# script:
# - 'export SHARED_PATH="$(dirname ${CI_PROJECT_DIR})/shared"'
# - rm -r ${SHARED_PATH} || true
# - docker build -f Dockerfile.test -t wallet-emulator-bridge-tests .
# - mkdir -p ${SHARED_PATH}/trezor-wallet/screenshots
# - mkdir -p ${SHARED_PATH}/trezor-wallet/videos
# - docker run --volume ${SHARED_PATH}/trezor-wallet/screenshots:/trezor-wallet/test/screenshots --volume ${SHARED_PATH}/trezor-wallet/videos:/trezor-wallet/test/videos --rm wallet-emulator-bridge-tests
# - find ${SHARED_PATH}
# - mkdir trezor-wallet
# - cp -r ${SHARED_PATH}/ trezor-wallet/
# artifacts:
# when: always
# expire_in: 1 week
# paths:
# - trezor-wallet/