Skip to content
Snippets Groups Projects
Commit db43b8f9 authored by Ilia Eriomenco's avatar Ilia Eriomenco
Browse files

ci: disabled teplates in eLife test

parent f03d665f
No related branches found
No related tags found
No related merge requests found
variables: variables:
IMAGE_ORG: kotahi IMAGE_ORG: kotahi
IMAGE_NAME: kotahi IMAGE_NAME: kotahi
GIT_STRATEGY: none
POSTGRES_USER: kotahidev
POSTGRES_PASSWORD: kotahidev
PGUSER: kotahidev
PGPASSWORD: kotahidev
stages: stages:
- build - build
...@@ -67,34 +72,9 @@ deploy: ...@@ -67,34 +72,9 @@ deploy:
# - cd ${HOME} # - cd ${HOME}
# - npm run lint # - npm run lint
.test_template: &run_test_template ## TODO: implement this template without error "(node:965) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined"
image: $IMAGE_ORG/$IMAGE_NAME-dev:$CI_COMMIT_SHA ## Issue: https://gitlab.coko.foundation/kotahi/kotahi/-/issues/183
stage: test # .test_template: &run_test_template
variables:
GIT_STRATEGY: none
# setup data for postgres image
POSTGRES_USER: kotahidev
POSTGRES_PASSWORD: kotahidev
# used by psql
PGUSER: kotahidev
PGPASSWORD: kotahidev
services:
- postgres
test-chrome:
<<: *run_test_template
script:
- cd ${HOME}
- apt-get -y install postgresql-client
# use the example env for tests
- cp .env.example .env
# this is needed for pgboss initial setup
- psql -h postgres -U kotahidev -d kotahidev -c "create extension pgcrypto;"
# specify host here else it confuses the linked postgres image
- POSTGRES_HOST=postgres yarn test:all:chrome:elife
# test-chrome:
# image: $IMAGE_ORG/$IMAGE_NAME-dev:$CI_COMMIT_SHA # image: $IMAGE_ORG/$IMAGE_NAME-dev:$CI_COMMIT_SHA
# stage: test # stage: test
# variables: # variables:
...@@ -107,94 +87,172 @@ test-chrome: ...@@ -107,94 +87,172 @@ test-chrome:
# PGPASSWORD: kotahidev # PGPASSWORD: kotahidev
# # this is used to ignore self signed certs # # this is used to ignore self signed certs
# #START_SERVER_AND_TEST_INSECURE: 1 # #START_SERVER_AND_TEST_INSECURE: 1
# INSTANCE_NAME: elife
# services: # services:
# - postgres # - postgres
# script:
# - cd ${HOME}
# - apt-get -y install postgresql-client
# # this is needed for pgboss initial setup
# - hostname
# - psql -h postgres -U kotahidev -d kotahidev -c "create extension pgcrypto;"
# # use the example env for tests
# - cp .env.example .env
# # specify host here else it confuses the linked postgres image
# - POSTGRES_HOST=postgres yarn test:all:chrome:elife
# test-chrome-samsung:
# <<: *run_test_template
# variables:
# TEST_ITEM: "chrome:elife:samsung"
# script:
# - *run_script_template
# test-chrome-samsung-tablet: ## TODO: implement this template without error "psql: could not translate host name "postgres" to address: Name or service not known"
## Issue: https://gitlab.coko.foundation/kotahi/kotahi/-/issues/183
# .script_template: &run_script_template
# - cd ${HOME}
# - apt-get -y install postgresql-client
# # use the example env for tests
# - cp .env.example .env
# # this is needed for pgboss initial setup
# - psql -h postgres -U kotahidev -d kotahidev -c "create extension pgcrypto;"
# # specify host here else it confuses the linked postgres image
# - POSTGRES_HOST=postgres yarn test:all:$TEST_ITEM
# test-chrome:
# <<: *run_test_template # <<: *run_test_template
# variables: # variables:
# TEST_ITEM: "chrome:elife:samsung:tablet" # TEST_ITEM: "chrome:elife"
# script: # script:
# - *run_script_template # - *run_script_template
# test-chrome-iPhone: test-chrome:
# <<: *run_test_template image: $IMAGE_ORG/$IMAGE_NAME-dev:$CI_COMMIT_SHA
# variables: stage: test
# TEST_ITEM: "chrome:elife:iPhone" services:
# script: - postgres
# - *run_script_template script:
- cd ${HOME}
- apt-get -y install postgresql-client
# this is needed for pgboss initial setup
- psql -h postgres -U kotahidev -d kotahidev -c "create extension pgcrypto;"
# use the example env for tests
- cp .env.example .env
# specify host here else it confuses the linked postgres image
- POSTGRES_HOST=postgres yarn test:all:chrome:elife
# test-chrome-iPhone-tablet: test-chrome-samsung:
# <<: *run_test_template image: $IMAGE_ORG/$IMAGE_NAME-dev:$CI_COMMIT_SHA
# variables: stage: test
# TEST_ITEM: "chrome:elife:iPhone:tablet" services:
# script: - postgres
# - *run_script_template script:
- cd ${HOME}
- apt-get -y install postgresql-client
- psql -h postgres -U kotahidev -d kotahidev -c "create extension pgcrypto;"
- cp .env.example .env
- POSTGRES_HOST=postgres yarn test:all:chrome:elife:samsung
# test-chrome-hd-laptop: test-chrome-samsung-tablet:
# <<: *run_test_template image: $IMAGE_ORG/$IMAGE_NAME-dev:$CI_COMMIT_SHA
# variables: stage: test
# TEST_ITEM: "chrome:elife:hd:laptop" services:
# script: - postgres
# - *run_script_template script:
- cd ${HOME}
- apt-get -y install postgresql-client
- psql -h postgres -U kotahidev -d kotahidev -c "create extension pgcrypto;"
- cp .env.example .env
- POSTGRES_HOST=postgres yarn test:all:chrome:elife:samsung:tablet
# test-firefox: test-chrome-iPhone:
# <<: *run_test_template image: $IMAGE_ORG/$IMAGE_NAME-dev:$CI_COMMIT_SHA
# variables: stage: test
# TEST_ITEM: "firefox:elife" services:
# script: - postgres
# - *run_script_template script:
- cd ${HOME}
- apt-get -y install postgresql-client
- psql -h postgres -U kotahidev -d kotahidev -c "create extension pgcrypto;"
- cp .env.example .env
- POSTGRES_HOST=postgres yarn test:all:chrome:elife:iPhone
# test-firefox-samsung: test-chrome-iPhone-tablet:
# <<: *run_test_template image: $IMAGE_ORG/$IMAGE_NAME-dev:$CI_COMMIT_SHA
# variables: stage: test
# TEST_ITEM: "firefox:elife:samsung" services:
# script: - postgres
# - *run_script_template script:
- cd ${HOME}
- apt-get -y install postgresql-client
- psql -h postgres -U kotahidev -d kotahidev -c "create extension pgcrypto;"
- cp .env.example .env
- POSTGRES_HOST=postgres yarn test:all:chrome:elife:iPhone:tablet
# test-firefox-samsung-tablet: test-chrome-hd-laptop:
# <<: *run_test_template image: $IMAGE_ORG/$IMAGE_NAME-dev:$CI_COMMIT_SHA
# variables: stage: test
# TEST_ITEM: "firefox:elife:samsung:tablet" services:
# script: - postgres
# - *run_script_template script:
- cd ${HOME}
- apt-get -y install postgresql-client
- psql -h postgres -U kotahidev -d kotahidev -c "create extension pgcrypto;"
- cp .env.example .env
- POSTGRES_HOST=postgres yarn test:all:chrome:elife:hd:laptop
# test-firefox-iPhone: test-firefox:
# <<: *run_test_template image: $IMAGE_ORG/$IMAGE_NAME-dev:$CI_COMMIT_SHA
# variables: stage: test
# TEST_ITEM: "firefox:elife:iPhone" services:
# script: - postgres
# - *run_script_template script:
- cd ${HOME}
- apt-get -y install postgresql-client
- psql -h postgres -U kotahidev -d kotahidev -c "create extension pgcrypto;"
- cp .env.example .env
- POSTGRES_HOST=postgres yarn test:all:firefox:elife
# test-firefox-iPhone-tablet: test-firefox-samsung:
# <<: *run_test_template image: $IMAGE_ORG/$IMAGE_NAME-dev:$CI_COMMIT_SHA
# variables: stage: test
# TEST_ITEM: "firefox:elife:iPhone:tablet" services:
# script: - postgres
# - *run_script_template script:
- cd ${HOME}
- apt-get -y install postgresql-client
- psql -h postgres -U kotahidev -d kotahidev -c "create extension pgcrypto;"
- cp .env.example .env
- POSTGRES_HOST=postgres yarn test:all:firefox:elife:samsung
# test-firefox-hd-laptop: test-firefox-samsung-tablet:
# <<: *run_test_template image: $IMAGE_ORG/$IMAGE_NAME-dev:$CI_COMMIT_SHA
# variables: stage: test
# TEST_ITEM: "firefox:elife:hd:laptop" services:
# script: - postgres
# - *run_script_template script:
- cd ${HOME}
- apt-get -y install postgresql-client
- psql -h postgres -U kotahidev -d kotahidev -c "create extension pgcrypto;"
- cp .env.example .env
- POSTGRES_HOST=postgres yarn test:all:firefox:elife:samsung:tablet
test-firefox-iPhone:
image: $IMAGE_ORG/$IMAGE_NAME-dev:$CI_COMMIT_SHA
stage: test
services:
- postgres
script:
- cd ${HOME}
- apt-get -y install postgresql-client
- psql -h postgres -U kotahidev -d kotahidev -c "create extension pgcrypto;"
- cp .env.example .env
- POSTGRES_HOST=postgres yarn test:all:firefox:elife:iPhone
test-firefox-iPhone-tablet:
image: $IMAGE_ORG/$IMAGE_NAME-dev:$CI_COMMIT_SHA
stage: test
services:
- postgres
script:
- cd ${HOME}
- apt-get -y install postgresql-client
- psql -h postgres -U kotahidev -d kotahidev -c "create extension pgcrypto;"
- cp .env.example .env
- POSTGRES_HOST=postgres yarn test:all:firefox:elife:iPhone:tablet
test-firefox-hd-laptop:
image: $IMAGE_ORG/$IMAGE_NAME-dev:$CI_COMMIT_SHA
stage: test
services:
- postgres
script:
- cd ${HOME}
- apt-get -y install postgresql-client
- psql -h postgres -U kotahidev -d kotahidev -c "create extension pgcrypto;"
- cp .env.example .env
- POSTGRES_HOST=postgres yarn test:all:firefox:elife:hd:laptop
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment