test yarn e2e
This commit is contained in:
parent
0ad28d056c
commit
fc8ba8b84e
5 changed files with 54 additions and 46 deletions
|
@ -8,9 +8,10 @@ local stages_list = [
|
|||
// gitlab-ci stages
|
||||
'docker_base',
|
||||
'docker_build',
|
||||
'integration',
|
||||
|
||||
'deploy_preview',
|
||||
'unit_tests',
|
||||
'integration',
|
||||
'docker_release',
|
||||
'deploy_staging',
|
||||
'teardown',
|
||||
|
@ -100,20 +101,25 @@ local jobs = {
|
|||
|
||||
// Integration API
|
||||
local integration_test = baseJob.EndToEndTest {
|
||||
stage: stages.unit_tests
|
||||
stage: stages.integration
|
||||
},
|
||||
|
||||
'demo_e2e': integration_test {
|
||||
'yarn_e2e': integration_test {
|
||||
variables+: {"APP_HOST": "http://localhost:80"},
|
||||
services+: ["selenium/standalone-chrome:3.4.0"],
|
||||
before_script+: [
|
||||
"curl -sL https://deb.nodesource.com/setup_8.x | bash -",
|
||||
"apt-get update && apt-get install -y nodejs",
|
||||
],
|
||||
script: [
|
||||
"sleep 60",
|
||||
"python initdb.py",
|
||||
"sleep 30",
|
||||
"curl localhost:80/cnr/version",
|
||||
"sleep 30",
|
||||
"curl localhost:80",
|
||||
"sleep 30",
|
||||
"curl localhost:80/status",
|
||||
"./node_modules/.bin/webdriver-manager update",
|
||||
"yarn e2e",
|
||||
]
|
||||
},
|
||||
|
||||
// Unit-tests with real databases
|
||||
local db_stage = { stage: stages.unit_tests },
|
||||
local dbname = 'quay',
|
||||
|
|
|
@ -14,7 +14,7 @@ container-base-build:
|
|||
tags:
|
||||
- kubernetes
|
||||
variables:
|
||||
DOCKER_DRIVER: overlay
|
||||
DOCKER_DRIVER: overlay2
|
||||
DOCKER_HOST: tcp://docker-host.gitlab-runner.svc.cluster.local:2375
|
||||
container-build:
|
||||
before_script:
|
||||
|
@ -31,7 +31,7 @@ container-build:
|
|||
tags:
|
||||
- kubernetes
|
||||
variables:
|
||||
DOCKER_DRIVER: overlay
|
||||
DOCKER_DRIVER: overlay2
|
||||
DOCKER_HOST: tcp://docker-host.gitlab-runner.svc.cluster.local:2375
|
||||
container-release:
|
||||
before_script:
|
||||
|
@ -48,39 +48,8 @@ container-release:
|
|||
tags:
|
||||
- kubernetes
|
||||
variables:
|
||||
DOCKER_DRIVER: overlay
|
||||
DOCKER_DRIVER: overlay2
|
||||
DOCKER_HOST: tcp://docker-host.gitlab-runner.svc.cluster.local:2375
|
||||
demo_e2e:
|
||||
before_script:
|
||||
- cd $QUAYDIR
|
||||
- source $QUAYDIR/venv/bin/activate
|
||||
- sleep 30
|
||||
- alembic upgrade head
|
||||
image: quay.io/quay/quay-ci:${CI_COMMIT_REF_SLUG}
|
||||
script:
|
||||
- python initdb.py
|
||||
- sleep 30
|
||||
- curl localhost:80/cnr/version
|
||||
- sleep 30
|
||||
- curl localhost:80
|
||||
- sleep 30
|
||||
- curl localhost:80/status
|
||||
services:
|
||||
- postgres:9.6
|
||||
- quay.io/quay/quay-ci:${CI_COMMIT_REF_SLUG}
|
||||
stage: unit_tests
|
||||
tags:
|
||||
- kubernetes
|
||||
variables:
|
||||
DB_URI: postgresql://quay:quay@localhost/quay
|
||||
GIT_STRATEGY: none
|
||||
POSTGRES_PASSWORD: quay
|
||||
POSTGRES_USER: quay
|
||||
PYTHONPATH: .
|
||||
QUAYDIR: /quay-registry
|
||||
SKIP_DB_SCHEMA: 'true'
|
||||
TEST: 'true'
|
||||
TEST_DATABASE_URI: postgresql://quay:quay@localhost/quay
|
||||
deploy-preview:
|
||||
before_script:
|
||||
- appr login -u $DOCKER_USER -p $DOCKER_PASS quay.io
|
||||
|
@ -222,9 +191,9 @@ registry-tests:
|
|||
stages:
|
||||
- docker_base
|
||||
- docker_build
|
||||
- integration
|
||||
- deploy_preview
|
||||
- unit_tests
|
||||
- integration
|
||||
- docker_release
|
||||
- deploy_staging
|
||||
- teardown
|
||||
|
@ -273,3 +242,36 @@ unit-tests:
|
|||
TEST: 'true'
|
||||
variables:
|
||||
FAILFASTCI_NAMESPACE: quay
|
||||
yarn_e2e:
|
||||
before_script:
|
||||
- cd $QUAYDIR
|
||||
- source $QUAYDIR/venv/bin/activate
|
||||
- sleep 30
|
||||
- alembic upgrade head
|
||||
- curl -sL https://deb.nodesource.com/setup_8.x | bash -
|
||||
- apt-get update && apt-get install -y nodejs
|
||||
image: quay.io/quay/quay-ci:${CI_COMMIT_REF_SLUG}
|
||||
script:
|
||||
- sleep 60
|
||||
- python initdb.py
|
||||
- sleep 30
|
||||
- ./node_modules/.bin/webdriver-manager update
|
||||
- yarn e2e
|
||||
services:
|
||||
- postgres:9.6
|
||||
- quay.io/quay/quay-ci:${CI_COMMIT_REF_SLUG}
|
||||
- selenium/standalone-chrome:3.4.0
|
||||
stage: integration
|
||||
tags:
|
||||
- kubernetes
|
||||
variables:
|
||||
APP_HOST: http://localhost:80
|
||||
DB_URI: postgresql://quay:quay@localhost/quay
|
||||
GIT_STRATEGY: none
|
||||
POSTGRES_PASSWORD: quay
|
||||
POSTGRES_USER: quay
|
||||
PYTHONPATH: .
|
||||
QUAYDIR: /quay-registry
|
||||
SKIP_DB_SCHEMA: 'true'
|
||||
TEST: 'true'
|
||||
TEST_DATABASE_URI: postgresql://quay:quay@localhost/quay
|
||||
|
|
|
@ -3,7 +3,7 @@ function(vars={})
|
|||
dockerBuild: {
|
||||
// base job to manage containers (build / push)
|
||||
variables: {
|
||||
DOCKER_DRIVER: "overlay",
|
||||
DOCKER_DRIVER: "overlay2",
|
||||
DOCKER_HOST: "tcp://docker-host.gitlab-runner.svc.cluster.local:2375"
|
||||
},
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ RUN add-apt-repository ppa:nginx/development
|
|||
# Add Yarn repository until it is officially added to Ubuntu
|
||||
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
|
||||
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
|
||||
|
||||
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash -
|
||||
# Install system packages
|
||||
RUN apt-get update && apt-get upgrade -y \
|
||||
&& apt-get install -y \
|
||||
|
|
|
@ -20,7 +20,7 @@ export const config: Config = {
|
|||
framework: 'jasmine',
|
||||
seleniumAddress: 'http://localhost:4444/wd/hub',
|
||||
// Uncomment to run tests against local Chrome instance
|
||||
directConnect: true,
|
||||
// directConnect: true,
|
||||
capabilities: {
|
||||
browserName: 'chrome',
|
||||
chromeOptions: {
|
||||
|
|
Reference in a new issue