turniere-backend/.gitlab-ci.yml

44 lines
906 B
YAML

stages:
- build
- test
- deploy
include:
- project: 'turniere/turniere-infra'
file: '/ci/pipeline.yaml'
rails spec:
stage: test
image: $CI_REGISTRY_IMAGE/test/commits:$CI_COMMIT_SHA
rules:
- if: $SKIP_TEST
when: never
- if: $CI_PIPELINE_SOURCE != "push"
when: never
- when: always
script:
- cd /app
- python3 -m pip install invoke
- inv db-migrate
- inv test
artifacts:
paths:
- specs_with_runtime.txt
expire_in: 30 days
rails e2e spec:
stage: test
image: $CI_REGISTRY_IMAGE/test/commits:$CI_COMMIT_SHA
rules:
- if: $SKIP_TEST
when: never
- if: $CI_PIPELINE_SOURCE != "push"
when: never
- when: always
script:
- cd /app
- python3 -m pip install invoke
- inv verify-http
after_script:
- 'test -f /tmp/turniere-e2e-server.log && tail -n 200 /tmp/turniere-e2e-server.log || true'