Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Kotahi
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Omo Oaiya
Kotahi
Commits
5af7a5e7
Commit
5af7a5e7
authored
4 years ago
by
Ilia Eriomenco
Browse files
Options
Downloads
Patches
Plain Diff
ci: refactored eLife tests with DRY
parent
ae127b24
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.elife.yml
+168
-136
168 additions, 136 deletions
.gitlab-ci.elife.yml
with
168 additions
and
136 deletions
.gitlab-ci.elife.yml
+
168
−
136
View file @
5af7a5e7
...
...
@@ -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
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment