Skip to content
Snippets Groups Projects
Verified Commit 5cfbd3ef authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

[CI] Restructure pipeline to do more in parallel

parent 99b5b169
No related branches found
No related tags found
No related merge requests found
Pipeline #319 failed
stages: stages:
- build_standalone - build
- test_standalone - test
- build_integrated
- test_integrated
- deploy - deploy
variables: variables:
...@@ -22,7 +20,7 @@ cache: ...@@ -22,7 +20,7 @@ cache:
- .cache/pip - .cache/pip
build_wheel: build_wheel:
stage: build_standalone stage: build
image: image:
name: registry.edugit.org/teckids/docker-images/python-pimped:master name: registry.edugit.org/teckids/docker-images/python-pimped:master
script: script:
...@@ -31,19 +29,8 @@ build_wheel: ...@@ -31,19 +29,8 @@ build_wheel:
paths: paths:
- dist/ - dist/
test_wheel:
stage: test_standalone
image:
name: registry.edugit.org/teckids/docker-images/python-pimped:master
before_script:
- adduser --disabled-password --gecos "Test User" testuser
script:
- poetry export --without-hashes --dev -f requirements.txt | pip install -r /dev/stdin
- eatmydata pip install dist/*.whl
- sudo -u testuser eatmydata tox
build_docker: build_docker:
stage: build_integrated stage: build
image: image:
name: gcr.io/kaniko-project/executor:debug name: gcr.io/kaniko-project/executor:debug
entrypoint: [""] entrypoint: [""]
...@@ -62,8 +49,24 @@ build_docker: ...@@ -62,8 +49,24 @@ build_docker:
--cache=true --cache=true
--cleanup --cleanup
test_docker_selenium: test_wheel:
stage: test_integrated stage: test
image:
name: registry.edugit.org/teckids/docker-images/python-pimped:master
before_script:
- apt-get -y update && eatmydata apt-get -y install chromium-driver
- adduser --disabled-password --gecos "Test User" testuser
- mkdir -p screenshots && chown testuser screenshots
script:
- poetry export --without-hashes --dev -f requirements.txt | pip install -r /dev/stdin
- eatmydata pip install dist/*.whl
- sudo -u testuser eatmydata env TEST_SCREENSHOT_PATH=./screenshots tox
artifacts:
paths:
- screenshots/
test_docker:
stage: test
image: image:
name: registry.edugit.org/teckids/docker-images/python-pimped:master name: registry.edugit.org/teckids/docker-images/python-pimped:master
services: services:
...@@ -73,17 +76,8 @@ test_docker_selenium: ...@@ -73,17 +76,8 @@ test_docker_selenium:
alias: memcached alias: memcached
- name: registry.edugit.org/biscuit/biscuit-ng:${CI_COMMIT_REF_NAME} - name: registry.edugit.org/biscuit/biscuit-ng:${CI_COMMIT_REF_NAME}
alias: app alias: app
before_script:
- apt-get -y update && eatmydata apt-get -y install chromium-driver
- eatmydata pip install selenium pytest-selenium
- poetry export --without-hashes --dev -f requirements.txt | pip install -r /dev/stdin
- eatmydata pip install dist/*.whl
- adduser --disabled-password --gecos "Test User" testuser
script: script:
- sudo -u testuser eatmydata tox -e selenium - echo true
artifacts:
paths:
- screenshots/
deploy_demo-master: deploy_demo-master:
stage: deploy stage: deploy
......
...@@ -7,6 +7,8 @@ whitelist_externals = poetry ...@@ -7,6 +7,8 @@ whitelist_externals = poetry
pytest pytest
skip_install = true skip_install = true
commands = pytest --pylama --cov=biscuit biscuit/core/ commands = pytest --pylama --cov=biscuit biscuit/core/
setenv =
TEST_SCREENSHOT_PATH = {env:TEST_SCREENSHOT_PATH}
[pylama] [pylama]
linters = pycodestyle,pyflakes,radon linters = pycodestyle,pyflakes,radon
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment