Added test stage
This commit is contained in:
parent
03490762be
commit
143e1bc570
1 changed files with 14 additions and 2 deletions
|
|
@ -1,6 +1,18 @@
|
|||
stages:
|
||||
- test
|
||||
- build
|
||||
|
||||
run_tests:
|
||||
stage: test
|
||||
image: python:3.12
|
||||
before_script:
|
||||
- python -m pip install --upgrade pip
|
||||
- pip install --no-cache-dir -r requirements/base.txt
|
||||
script:
|
||||
- python manage.py test --verbosity=2
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == "main"
|
||||
|
||||
build_and_push:
|
||||
stage: build
|
||||
image: docker:24.0.7
|
||||
|
|
@ -9,8 +21,8 @@ build_and_push:
|
|||
DOCKER_TLS_CERTDIR: ''
|
||||
services:
|
||||
- name: docker:24.0.7-dind
|
||||
alias: docker
|
||||
command: ['--tls=false', '--host=tcp://0.0.0.0:2375']
|
||||
alias: docker
|
||||
command: ['--tls=false', '--host=tcp://0.0.0.0:2375']
|
||||
script:
|
||||
- echo "Waiting for Docker daemon..."
|
||||
- for i in $(seq 1 30); do docker info && break || sleep 1; done
|
||||
|
|
|
|||
Loading…
Reference in a new issue