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

ci: refactored eLife tests with DRY

parent ae127b24
No related branches found
No related tags found
No related merge requests found
......@@ -84,158 +84,190 @@ lint:
services:
- postgres
#.script_template: &run_script_template
# - 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:$TEST_ITEM
test-chrome:
<<: *run_test_template
variables:
TEST_ITEM: elife
script:
.script_template: &run_script_template
- 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-samsung:
test-chrome:
<<: *run_test_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
- *run_script_template
# specify host here else it confuses the linked postgres image
- POSTGRES_HOST=postgres yarn test:all:chrome:elife:samsung
- POSTGRES_HOST=postgres yarn test:all:chrome:elife
test-chrome-samsung-tablet:
<<: *run_test_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:samsung:tablet
# .test_template: &run_test_template
# image: $IMAGE_ORG/$IMAGE_NAME-dev:$CI_COMMIT_SHA
# stage: test
# variables:
# GIT_STRATEGY: none
# # setup data for postgres image
# POSTGRES_USER: kotahidev
# POSTGRES_PASSWORD: kotahidev
# # used by psql
# PGUSER: kotahidev
# PGPASSWORD: kotahidev
# # this is used to ignore self signed certs
# START_SERVER_AND_TEST_INSECURE: 1
# INSTANCE_NAME: elife
# services:
# - postgres
test-chrome-iPhone:
<<: *run_test_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:iPhone
# #.script_template: &run_script_template
# # - 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:$TEST_ITEM
test-chrome-iPhone-tablet:
<<: *run_test_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:iPhone:tablet
# test-chrome:
# <<: *run_test_template
# variables:
# TEST_ITEM: elife
# 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-hd-laptop:
<<: *run_test_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:hd:laptop
# test-chrome-samsung:
# <<: *run_test_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:samsung
test-firefox:
<<: *run_test_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:firefox:elife
# test-chrome-samsung-tablet:
# <<: *run_test_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:samsung:tablet
test-firefox-samsung:
<<: *run_test_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:firefox:elife:samsung
# test-chrome-iPhone:
# <<: *run_test_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:iPhone
test-firefox-samsung-tablet:
<<: *run_test_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:firefox:elife:samsung:tablet
# test-chrome-iPhone-tablet:
# <<: *run_test_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:iPhone:tablet
test-firefox-iPhone:
<<: *run_test_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:firefox:elife:iPhone
# test-chrome-hd-laptop:
# <<: *run_test_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:hd:laptop
test-firefox-iPhone-tablet:
<<: *run_test_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:firefox:elife:iPhone:tablet
# test-firefox:
# <<: *run_test_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:firefox:elife
test-firefox-hd-laptop:
<<: *run_test_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:firefox:elife:hd:laptop
\ No newline at end of file
# test-firefox-samsung:
# <<: *run_test_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:firefox:elife:samsung
# test-firefox-samsung-tablet:
# <<: *run_test_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:firefox:elife:samsung:tablet
# test-firefox-iPhone:
# <<: *run_test_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:firefox:elife:iPhone
# test-firefox-iPhone-tablet:
# <<: *run_test_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:firefox:elife:iPhone:tablet
# test-firefox-hd-laptop:
# <<: *run_test_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:firefox:elife:hd:laptop
\ No newline at end of file
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