Skip to content
Snippets Groups Projects
Commit 8e688c19 authored by nguyed99's avatar nguyed99
Browse files

simplify pipeline

parent b7f0da31
Branches
No related tags found
No related merge requests found
Pipeline #58770 failed
image: python:3.11-bullseye
stages:
- build
- test-jobs
- test-tasks
variables:
POETRY_CACHE_DIR: "$CI_PROJECT_DIR/.cache/poetry"
cache:
paths:
- .cache/poetry
build-env:
stage: build
script:
before_script:
- pip install poetry
- poetry --version
- cd build/
- poetry config virtualenvs.in-project true
- poetry install --no-root
artifacts:
paths:
- $POETRY_CACHE_DIR/virtualenvs/
- cd ..
test-jobs:
stage: test-jobs
script:
- export VIRTUALENV_NAME=$(ls $POETRY_CACHE_DIR/virtualenvs)
- source $POETRY_CACHE_DIR/virtualenvs/$VIRTUALENV_NAME/bin/activate
- export PYTHONPATH="$PYTHONPATH:$CI_PROJECT_DIR/jobs/src"
- poetry run pytest jobs/tests/
test-tasks:
stage: test-tasks
script:
- export VIRTUALENV_NAME=$(ls $POETRY_CACHE_DIR/virtualenvs)
- source $POETRY_CACHE_DIR/virtualenvs/$VIRTUALENV_NAME/bin/activate
- export PYTHONPATH="$PYTHONPATH:$CI_PROJECT_DIR/tasks/src"
- poetry run pytest tasks/tests/
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment